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
296 changes: 142 additions & 154 deletions lib/services/subscriptionManagement2/lib/models/index.d.ts

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,11 @@ class SubscriptionCreationParameters {
/**
* Create a SubscriptionCreationParameters.
* @property {string} [displayName] The display name of the subscription.
* @property {array} [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.
* @property {string} [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'
* @property {string} [billingProfileId] The ARM id of the billing profile.
* @property {string} [skuId] The commerce id of the sku.
* @property {string} [costCenter] optional customer cost center
* @property {object} [owner] rbac owner of the subscription
* @property {string} [owner.objectId] Object id of the Principal
* @property {object} [additionalParameters] Additional, untyped parameters
* to support custom subscription creation scenarios.
*/
Expand Down Expand Up @@ -54,28 +51,35 @@ class SubscriptionCreationParameters {
name: 'String'
}
},
owners: {
billingProfileId: {
required: false,
serializedName: 'owners',
serializedName: 'billingProfileId',
type: {
name: 'Sequence',
element: {
required: false,
serializedName: 'AdPrincipalElementType',
type: {
name: 'Composite',
className: 'AdPrincipal'
}
}
name: 'String'
}
},
skuId: {
required: false,
serializedName: 'skuId',
type: {
name: 'String'
}
},
offerType: {
costCenter: {
required: false,
serializedName: 'offerType',
serializedName: 'costCenter',
type: {
name: 'String'
}
},
owner: {
required: false,
serializedName: 'owner',
type: {
name: 'Composite',
className: 'AdPrincipal'
}
},
additionalParameters: {
required: false,
serializedName: 'additionalParameters',
Expand Down
134 changes: 74 additions & 60 deletions lib/services/subscriptionManagement2/lib/operations/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,18 @@ export interface Operations {

/**
* @class
* SubscriptionOperations
* SubscriptionOperationOperations
* __NOTE__: An instance of this class is automatically created for an
* instance of the SubscriptionClient.
*/
export interface SubscriptionOperations {
export interface SubscriptionOperationOperations {


/**
* Lists all of the available pending Microsoft.Subscription API operations.
* Get the status of the pending Microsoft.Subscription API operations.
*
* @param {string} operationId The operation ID, which can be found from the
* Location field in the generate recommendation response header.
*
* @param {object} [options] Optional Parameters.
*
Expand All @@ -91,14 +94,17 @@ export interface SubscriptionOperations {
*
* @returns {Promise} A promise is returned
*
* @resolve {HttpOperationResponse<SubscriptionOperationListResult>} - The deserialized result object.
* @resolve {HttpOperationResponse<SubscriptionCreationResult>} - The deserialized result object.
*
* @reject {Error|ServiceError} - The error object.
*/
listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.SubscriptionOperationListResult>>;
getWithHttpOperationResponse(operationId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.SubscriptionCreationResult>>;

/**
* Lists all of the available pending Microsoft.Subscription API operations.
* Get the status of the pending Microsoft.Subscription API operations.
*
* @param {string} operationId The operation ID, which can be found from the
* Location field in the generate recommendation response header.
*
* @param {object} [options] Optional Parameters.
*
Expand All @@ -112,25 +118,25 @@ export interface SubscriptionOperations {
*
* {Promise} A promise is returned.
*
* @resolve {SubscriptionOperationListResult} - The deserialized result object.
* @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.
*
* {SubscriptionOperationListResult} [result] - The deserialized result object if an error did not occur.
* See {@link SubscriptionOperationListResult} for more
* {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.
*/
list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.SubscriptionOperationListResult>;
list(callback: ServiceCallback<models.SubscriptionOperationListResult>): void;
list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.SubscriptionOperationListResult>): void;
get(operationId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.SubscriptionCreationResult>;
get(operationId: string, callback: ServiceCallback<models.SubscriptionCreationResult>): void;
get(operationId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.SubscriptionCreationResult>): void;
}

/**
Expand All @@ -145,22 +151,24 @@ export interface SubscriptionFactory {
/**
* Creates an Azure subscription
*
* @param {string} enrollmentAccountName The name of the enrollment account to
* which the subscription will be billed.
* @param {string} billingAccountName The name of the commerce root billing
* account.
*
* @param {string} invoiceSectionName The name of the invoice section.
*
* @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.billingProfileId] The ARM id of the billing profile.
*
* @param {string} [body.skuId] The commerce id of the sku.
*
* @param {string} [body.costCenter] optional customer cost center
*
* @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.owner] rbac owner of the subscription
*
* @param {string} body.owner.objectId Object id of the Principal
*
* @param {object} [body.additionalParameters] Additional, untyped parameters
* to support custom subscription creation scenarios.
Expand All @@ -176,27 +184,29 @@ export interface SubscriptionFactory {
*
* @reject {Error|ServiceError} - The error object.
*/
createSubscriptionInEnrollmentAccountWithHttpOperationResponse(enrollmentAccountName: string, body: models.SubscriptionCreationParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.SubscriptionCreationResult>>;
createSubscriptionWithHttpOperationResponse(billingAccountName: string, invoiceSectionName: string, body: models.SubscriptionCreationParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.SubscriptionCreationResult>>;

/**
* Creates an Azure subscription
*
* @param {string} enrollmentAccountName The name of the enrollment account to
* which the subscription will be billed.
* @param {string} billingAccountName The name of the commerce root billing
* account.
*
* @param {string} invoiceSectionName The name of the invoice section.
*
* @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.billingProfileId] The ARM id of the billing profile.
*
* @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 {string} [body.skuId] The commerce id of the sku.
*
* @param {string} [body.costCenter] optional customer cost center
*
* @param {object} [body.owner] rbac owner of the subscription
*
* @param {string} body.owner.objectId Object id of the Principal
*
* @param {object} [body.additionalParameters] Additional, untyped parameters
* to support custom subscription creation scenarios.
Expand Down Expand Up @@ -229,30 +239,32 @@ export interface SubscriptionFactory {
*
* {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<models.SubscriptionCreationResult>;
createSubscriptionInEnrollmentAccount(enrollmentAccountName: string, body: models.SubscriptionCreationParameters, callback: ServiceCallback<models.SubscriptionCreationResult>): void;
createSubscriptionInEnrollmentAccount(enrollmentAccountName: string, body: models.SubscriptionCreationParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.SubscriptionCreationResult>): void;
createSubscription(billingAccountName: string, invoiceSectionName: string, body: models.SubscriptionCreationParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.SubscriptionCreationResult>;
createSubscription(billingAccountName: string, invoiceSectionName: string, body: models.SubscriptionCreationParameters, callback: ServiceCallback<models.SubscriptionCreationResult>): void;
createSubscription(billingAccountName: string, invoiceSectionName: string, body: models.SubscriptionCreationParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.SubscriptionCreationResult>): void;


/**
* Creates an Azure subscription
*
* @param {string} enrollmentAccountName The name of the enrollment account to
* which the subscription will be billed.
* @param {string} billingAccountName The name of the commerce root billing
* account.
*
* @param {string} invoiceSectionName The name of the invoice section.
*
* @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.billingProfileId] The ARM id of the billing profile.
*
* @param {string} [body.skuId] The commerce id of the sku.
*
* @param {string} [body.costCenter] optional customer cost center
*
* @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.owner] rbac owner of the subscription
*
* @param {string} body.owner.objectId Object id of the Principal
*
* @param {object} [body.additionalParameters] Additional, untyped parameters
* to support custom subscription creation scenarios.
Expand All @@ -268,27 +280,29 @@ export interface SubscriptionFactory {
*
* @reject {Error|ServiceError} - The error object.
*/
beginCreateSubscriptionInEnrollmentAccountWithHttpOperationResponse(enrollmentAccountName: string, body: models.SubscriptionCreationParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.SubscriptionCreationResult>>;
beginCreateSubscriptionWithHttpOperationResponse(billingAccountName: string, invoiceSectionName: string, body: models.SubscriptionCreationParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<HttpOperationResponse<models.SubscriptionCreationResult>>;

/**
* Creates an Azure subscription
*
* @param {string} enrollmentAccountName The name of the enrollment account to
* which the subscription will be billed.
* @param {string} billingAccountName The name of the commerce root billing
* account.
*
* @param {string} invoiceSectionName The name of the invoice section.
*
* @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.billingProfileId] The ARM id of the billing profile.
*
* @param {string} [body.skuId] The commerce id of the sku.
*
* @param {string} [body.costCenter] optional customer cost center
*
* @param {object} [body.owner] rbac owner of the subscription
*
* @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 {string} body.owner.objectId Object id of the Principal
*
* @param {object} [body.additionalParameters] Additional, untyped parameters
* to support custom subscription creation scenarios.
Expand Down Expand Up @@ -321,9 +335,9 @@ export interface SubscriptionFactory {
*
* {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<models.SubscriptionCreationResult>;
beginCreateSubscriptionInEnrollmentAccount(enrollmentAccountName: string, body: models.SubscriptionCreationParameters, callback: ServiceCallback<models.SubscriptionCreationResult>): void;
beginCreateSubscriptionInEnrollmentAccount(enrollmentAccountName: string, body: models.SubscriptionCreationParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.SubscriptionCreationResult>): void;
beginCreateSubscription(billingAccountName: string, invoiceSectionName: string, body: models.SubscriptionCreationParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise<models.SubscriptionCreationResult>;
beginCreateSubscription(billingAccountName: string, invoiceSectionName: string, body: models.SubscriptionCreationParameters, callback: ServiceCallback<models.SubscriptionCreationResult>): void;
beginCreateSubscription(billingAccountName: string, invoiceSectionName: string, body: models.SubscriptionCreationParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback<models.SubscriptionCreationResult>): void;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
'use strict';

exports.Operations = require('./operations');
exports.SubscriptionOperations = require('./subscriptionOperations');
exports.SubscriptionOperationOperations = require('./subscriptionOperationOperations');
exports.SubscriptionFactory = require('./subscriptionFactory');
exports.Subscriptions = require('./subscriptions');
exports.Tenants = require('./tenants');
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function _list(options, callback) {
if (!callback) {
throw new Error('callback cannot be null.');
}
let apiVersion = '2018-03-01-preview';
let apiVersion = '2018-11-01-preview';
// Validate
try {
if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') {
Expand Down
Loading