/* * 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 SubscriptionClient. */ export interface Operations { /** * Lists all of the available Microsoft.Subscription 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.Subscription 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; } /** * @class * SubscriptionOperations * __NOTE__: An instance of this class is automatically created for an * instance of the SubscriptionClient. */ export interface SubscriptionOperations { /** * Lists all of the available pending Microsoft.Subscription 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 pending Microsoft.Subscription 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 {SubscriptionOperationListResult} - 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. * * {SubscriptionOperationListResult} [result] - The deserialized result object if an error did not occur. * See {@link SubscriptionOperationListResult} 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; } /** * @class * SubscriptionFactory * __NOTE__: An instance of this class is automatically created for an * instance of the SubscriptionClient. */ export interface SubscriptionFactory { /** * Creates an Azure subscription * * @param {string} enrollmentAccountName The name of the enrollment account to * which the subscription will be billed. * * @param {object} body The subscription creation parameters. * * @param {string} [body.displayName] The display name of the subscription. * * @param {array} [body.owners] The list of principals that should be granted * Owner access on the subscription. Principals should be of type User, Service * Principal or Security Group. * * @param {string} [body.offerType] The offer type of the subscription. For * example, MS-AZR-0017P (EnterpriseAgreement) and MS-AZR-0148P * (EnterpriseAgreement devTest) are available. Only valid when creating a * subscription in a enrollment account scope. Possible values include: * 'MS-AZR-0017P', 'MS-AZR-0148P' * * @param {object} [body.additionalParameters] Additional, untyped parameters * to support custom subscription creation scenarios. * * @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. */ createSubscriptionInEnrollmentAccountWithHttpOperationResponse(enrollmentAccountName: string, body: models.SubscriptionCreationParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Creates an Azure subscription * * @param {string} enrollmentAccountName The name of the enrollment account to * which the subscription will be billed. * * @param {object} body The subscription creation parameters. * * @param {string} [body.displayName] The display name of the subscription. * * @param {array} [body.owners] The list of principals that should be granted * Owner access on the subscription. Principals should be of type User, Service * Principal or Security Group. * * @param {string} [body.offerType] The offer type of the subscription. For * example, MS-AZR-0017P (EnterpriseAgreement) and MS-AZR-0148P * (EnterpriseAgreement devTest) are available. Only valid when creating a * subscription in a enrollment account scope. Possible values include: * 'MS-AZR-0017P', 'MS-AZR-0148P' * * @param {object} [body.additionalParameters] Additional, untyped parameters * to support custom subscription creation scenarios. * * @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 {SubscriptionCreationResult} - 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. * * {SubscriptionCreationResult} [result] - The deserialized result object if an error did not occur. * See {@link SubscriptionCreationResult} 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. */ createSubscriptionInEnrollmentAccount(enrollmentAccountName: string, body: models.SubscriptionCreationParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; createSubscriptionInEnrollmentAccount(enrollmentAccountName: string, body: models.SubscriptionCreationParameters, callback: ServiceCallback): void; createSubscriptionInEnrollmentAccount(enrollmentAccountName: string, body: models.SubscriptionCreationParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Creates an Azure subscription * * @param {string} enrollmentAccountName The name of the enrollment account to * which the subscription will be billed. * * @param {object} body The subscription creation parameters. * * @param {string} [body.displayName] The display name of the subscription. * * @param {array} [body.owners] The list of principals that should be granted * Owner access on the subscription. Principals should be of type User, Service * Principal or Security Group. * * @param {string} [body.offerType] The offer type of the subscription. For * example, MS-AZR-0017P (EnterpriseAgreement) and MS-AZR-0148P * (EnterpriseAgreement devTest) are available. Only valid when creating a * subscription in a enrollment account scope. Possible values include: * 'MS-AZR-0017P', 'MS-AZR-0148P' * * @param {object} [body.additionalParameters] Additional, untyped parameters * to support custom subscription creation scenarios. * * @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. */ beginCreateSubscriptionInEnrollmentAccountWithHttpOperationResponse(enrollmentAccountName: string, body: models.SubscriptionCreationParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Creates an Azure subscription * * @param {string} enrollmentAccountName The name of the enrollment account to * which the subscription will be billed. * * @param {object} body The subscription creation parameters. * * @param {string} [body.displayName] The display name of the subscription. * * @param {array} [body.owners] The list of principals that should be granted * Owner access on the subscription. Principals should be of type User, Service * Principal or Security Group. * * @param {string} [body.offerType] The offer type of the subscription. For * example, MS-AZR-0017P (EnterpriseAgreement) and MS-AZR-0148P * (EnterpriseAgreement devTest) are available. Only valid when creating a * subscription in a enrollment account scope. Possible values include: * 'MS-AZR-0017P', 'MS-AZR-0148P' * * @param {object} [body.additionalParameters] Additional, untyped parameters * to support custom subscription creation scenarios. * * @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 {SubscriptionCreationResult} - 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. * * {SubscriptionCreationResult} [result] - The deserialized result object if an error did not occur. * See {@link SubscriptionCreationResult} 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. */ beginCreateSubscriptionInEnrollmentAccount(enrollmentAccountName: string, body: models.SubscriptionCreationParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; beginCreateSubscriptionInEnrollmentAccount(enrollmentAccountName: string, body: models.SubscriptionCreationParameters, callback: ServiceCallback): void; beginCreateSubscriptionInEnrollmentAccount(enrollmentAccountName: string, body: models.SubscriptionCreationParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** * @class * Subscriptions * __NOTE__: An instance of this class is automatically created for an * instance of the SubscriptionClient. */ export interface Subscriptions { /** * @summary Gets all available geo-locations. * * This operation provides all the locations that are available for resource * providers; however, each resource provider may support a subset of this * list. * * @param {string} subscriptionId The ID of the target subscription. * * @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. */ listLocationsWithHttpOperationResponse(subscriptionId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * @summary Gets all available geo-locations. * * This operation provides all the locations that are available for resource * providers; however, each resource provider may support a subset of this * list. * * @param {string} subscriptionId The ID of the target subscription. * * @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 {LocationListResult} - 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. * * {LocationListResult} [result] - The deserialized result object if an error did not occur. * See {@link LocationListResult} 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. */ listLocations(subscriptionId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; listLocations(subscriptionId: string, callback: ServiceCallback): void; listLocations(subscriptionId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Gets details about a specified subscription. * * @param {string} subscriptionId The ID of the target subscription. * * @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(subscriptionId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gets details about a specified subscription. * * @param {string} subscriptionId The ID of the target subscription. * * @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 {Subscription} - 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. * * {Subscription} [result] - The deserialized result object if an error did not occur. * See {@link Subscription} 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(subscriptionId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; get(subscriptionId: string, callback: ServiceCallback): void; get(subscriptionId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Gets all subscriptions for a tenant. * * @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>; /** * Gets all subscriptions for a tenant. * * @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 {SubscriptionListResult} - 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. * * {SubscriptionListResult} [result] - The deserialized result object if an error did not occur. * See {@link SubscriptionListResult} 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; /** * Gets all subscriptions for a tenant. * * @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>; /** * Gets all subscriptions for a tenant. * * @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 {SubscriptionListResult} - 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. * * {SubscriptionListResult} [result] - The deserialized result object if an error did not occur. * See {@link SubscriptionListResult} 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 * Tenants * __NOTE__: An instance of this class is automatically created for an * instance of the SubscriptionClient. */ export interface Tenants { /** * Gets the tenants for your account. * * @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>; /** * Gets the tenants for your account. * * @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 {TenantListResult} - 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. * * {TenantListResult} [result] - The deserialized result object if an error did not occur. * See {@link TenantListResult} 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; /** * Gets the tenants for your account. * * @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>; /** * Gets the tenants for your account. * * @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 {TenantListResult} - 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. * * {TenantListResult} [result] - The deserialized result object if an error did not occur. * See {@link TenantListResult} 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; }