Initial commit

This commit is contained in:
2025-03-07 19:22:02 +01:00
commit 4a98255d83
55743 changed files with 5280367 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
/// <reference lib="esnext.asynciterable" />
export { getContinuationToken } from "./pagingHelper";
export * from "./models";
export { SubscriptionClient } from "./subscriptionClient";
export * from "./operationsInterfaces";
//# sourceMappingURL=index.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AASA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,wBAAwB,CAAC"}
+13
View File
@@ -0,0 +1,13 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
/// <reference lib="esnext.asynciterable" />
export { getContinuationToken } from "./pagingHelper";
export * from "./models";
export { SubscriptionClient } from "./subscriptionClient";
export * from "./operationsInterfaces";
//# sourceMappingURL=index.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,4CAA4C;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,wBAAwB,CAAC"}
+16
View File
@@ -0,0 +1,16 @@
import { LongRunningOperation, LroResponse } from "@azure/core-lro";
export declare class LroImpl<T> implements LongRunningOperation<T> {
private sendOperationFn;
private args;
private spec;
requestPath: string;
requestMethod: string;
constructor(sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>, args: Record<string, unknown>, spec: {
readonly requestBody?: unknown;
readonly path?: string;
readonly httpMethod: string;
} & Record<string, any>, requestPath?: string, requestMethod?: string);
sendInitialRequest(): Promise<LroResponse<T>>;
sendPollRequest(path: string): Promise<LroResponse<T>>;
}
//# sourceMappingURL=lroImpl.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"lroImpl.d.ts","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEpE,qBAAa,OAAO,CAAC,CAAC,CAAE,YAAW,oBAAoB,CAAC,CAAC,CAAC;IAEtD,OAAO,CAAC,eAAe;IACvB,OAAO,CAAC,IAAI;IACZ,OAAO,CAAC,IAAI;IAKL,WAAW,EAAE,MAAM;IACnB,aAAa,EAAE,MAAM;gBARpB,eAAe,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAClE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,IAAI,EAAE;QACZ,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;QAC/B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;KAC7B,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAChB,WAAW,GAAE,MAAmB,EAChC,aAAa,GAAE,MAAwB;IAEnC,kBAAkB,IAAI,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAG7C,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;CAQpE"}
+29
View File
@@ -0,0 +1,29 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { __awaiter, __rest } from "tslib";
export class LroImpl {
constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
this.sendOperationFn = sendOperationFn;
this.args = args;
this.spec = spec;
this.requestPath = requestPath;
this.requestMethod = requestMethod;
}
sendInitialRequest() {
return __awaiter(this, void 0, void 0, function* () {
return this.sendOperationFn(this.args, this.spec);
});
}
sendPollRequest(path) {
return __awaiter(this, void 0, void 0, function* () {
const _a = this.spec, { requestBody } = _a, restSpec = __rest(_a, ["requestBody"]);
return this.sendOperationFn(this.args, Object.assign(Object.assign({}, restSpec), { path, httpMethod: "GET" }));
});
}
}
//# sourceMappingURL=lroImpl.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAIH,MAAM,OAAO,OAAO;IAClB,YACU,eAAkE,EAClE,IAA6B,EAC7B,IAIe,EAChB,cAAsB,IAAI,CAAC,IAAK,EAChC,gBAAwB,IAAI,CAAC,UAAU;QARtC,oBAAe,GAAf,eAAe,CAAmD;QAClE,SAAI,GAAJ,IAAI,CAAyB;QAC7B,SAAI,GAAJ,IAAI,CAIW;QAChB,gBAAW,GAAX,WAAW,CAAqB;QAChC,kBAAa,GAAb,aAAa,CAA0B;IAC7C,CAAC;IACS,kBAAkB;;YAC7B,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QACpD,CAAC;KAAA;IACY,eAAe,CAAC,IAAY;;YACvC,MAAM,KAA+B,IAAI,CAAC,IAAI,EAAxC,EAAE,WAAW,OAA2B,EAAtB,QAAQ,cAA1B,eAA4B,CAAY,CAAC;YAC/C,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,kCAChC,QAAQ,KACX,IAAI,EACJ,UAAU,EAAE,KAAK,IACjB,CAAC;QACL,CAAC;KAAA;CACF"}
+738
View File
@@ -0,0 +1,738 @@
import * as coreClient from "@azure/core-client";
/** Location list operation response. */
export interface LocationListResult {
/** An array of locations. */
value?: Location[];
}
/** Location information. */
export interface Location {
/**
* The fully qualified ID of the location. For example, /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly id?: string;
/**
* The subscription ID.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly subscriptionId?: string;
/**
* The location name.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly name?: string;
/**
* The display name of the location.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly displayName?: string;
/**
* The latitude of the location.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly latitude?: string;
/**
* The longitude of the location.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly longitude?: string;
}
/** Subscription information. */
export interface Subscription {
/**
* The fully qualified ID for the subscription. For example, /subscriptions/00000000-0000-0000-0000-000000000000.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly id?: string;
/**
* The subscription ID.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly subscriptionId?: string;
/**
* The subscription display name.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly displayName?: string;
/**
* The subscription state. Possible values are Enabled, Warned, PastDue, Disabled, and Deleted.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly state?: SubscriptionState;
/**
* The tenant ID. For example, 00000000-0000-0000-0000-000000000000.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly tenantId?: string;
/** Tags for the subscription */
tags?: {
[propertyName: string]: string;
};
/** The subscription policies. */
subscriptionPolicies?: SubscriptionPolicies;
/** The authorization source of the request. Valid values are one or more combinations of Legacy, RoleBased, Bypassed, Direct and Management. For example, 'Legacy, RoleBased'. */
authorizationSource?: string;
}
/** Subscription policies. */
export interface SubscriptionPolicies {
/**
* The subscription location placement ID. The ID indicates which regions are visible for a subscription. For example, a subscription with a location placement Id of Public_2014-09-01 has access to Azure public regions.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly locationPlacementId?: string;
/**
* The subscription quota ID.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly quotaId?: string;
/**
* The subscription spending limit.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly spendingLimit?: SpendingLimit;
}
/** Subscription list operation response. */
export interface SubscriptionListResult {
/** An array of subscriptions. */
value?: Subscription[];
/** The URL to get the next set of results. */
nextLink?: string;
}
/** Tenant Ids information. */
export interface TenantListResult {
/** An array of tenants. */
value?: TenantIdDescription[];
/** The URL to use for getting the next set of results. */
nextLink: string;
}
/** Tenant Id information. */
export interface TenantIdDescription {
/**
* The fully qualified ID of the tenant. For example, /tenants/00000000-0000-0000-0000-000000000000.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly id?: string;
/**
* The tenant ID. For example, 00000000-0000-0000-0000-000000000000.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly tenantId?: string;
/**
* The category of the tenant. Possible values are TenantCategoryHome,TenantCategoryProjectedBy,TenantCategoryManagedBy
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly tenantCategory?: string;
/**
* The country/region name of the address for the tenant.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly country?: string;
/**
* The Country/region abbreviation for the tenant.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly countryCode?: string;
/**
* The display name of the tenant.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly displayName?: string;
/**
* The list of domains for the tenant.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly domains?: string;
/**
* The default domain for the tenant.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly defaultDomain?: string;
/**
* The tenant type. Only available for Home tenant category.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly tenantType?: string;
}
/** The ID of the canceled subscription */
export interface CanceledSubscriptionId {
/**
* The ID of the canceled subscription
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly subscriptionId?: string;
}
/** Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message. */
export interface ErrorResponseBody {
/** The details of the error. */
error?: ErrorResponse;
/** Error code */
code?: string;
/** Error message indicating why the operation failed. */
message?: string;
}
/** Describes the format of Error response. */
export interface ErrorResponse {
/** Error code */
code?: string;
/** Error message indicating why the operation failed. */
message?: string;
}
/** The new name of the subscription. */
export interface SubscriptionName {
/** New subscription name */
subscriptionName?: string;
}
/** The ID of the subscriptions that is being renamed */
export interface RenamedSubscriptionId {
/**
* The ID of the subscriptions that is being renamed
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly subscriptionId?: string;
}
/** The ID of the subscriptions that is being enabled */
export interface EnabledSubscriptionId {
/**
* The ID of the subscriptions that is being enabled
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly subscriptionId?: string;
}
/** Result of the request to list operations. It contains a list of operations and a URL link to get the next set of results. */
export interface OperationListResult {
/** List of operations. */
value?: Operation[];
/** URL to get the next set of operation list results if there are any. */
nextLink?: string;
}
/** REST API operation */
export interface Operation {
/** Operation name: {provider}/{resource}/{operation} */
name?: string;
/** Indicates whether the operation is a data action */
isDataAction?: boolean;
/** The object that represents the operation. */
display?: OperationDisplay;
}
/** The object that represents the operation. */
export interface OperationDisplay {
/** Service provider: Microsoft.Subscription */
provider?: string;
/** Resource on which the operation is performed: Profile, endpoint, etc. */
resource?: string;
/** Operation type: Read, write, delete, etc. */
operation?: string;
/** Localized friendly description for the operation */
description?: string;
}
/** The parameters required to create a new subscription. */
export interface PutAliasRequest {
/** Put alias request properties. */
properties?: PutAliasRequestProperties;
}
/** Put subscription properties. */
export interface PutAliasRequestProperties {
/** The friendly name of the subscription. */
displayName?: string;
/** The workload type of the subscription. It can be either Production or DevTest. */
workload?: Workload;
/**
* Billing scope of the subscription.
* For CustomerLed and FieldLed - /billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}
* For PartnerLed - /billingAccounts/{billingAccountName}/customers/{customerName}
* For Legacy EA - /billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}
*/
billingScope?: string;
/** This parameter can be used to create alias for existing subscription Id */
subscriptionId?: string;
/** Reseller Id */
resellerId?: string;
/** Put alias request additional properties. */
additionalProperties?: PutAliasRequestAdditionalProperties;
}
/** Put subscription additional properties. */
export interface PutAliasRequestAdditionalProperties {
/** Management group Id for the subscription. */
managementGroupId?: string;
/** Tenant Id of the subscription */
subscriptionTenantId?: string;
/** Owner Id of the subscription */
subscriptionOwnerId?: string;
/** Tags for the subscription */
tags?: {
[propertyName: string]: string;
};
}
/** Subscription Information with the alias. */
export interface SubscriptionAliasResponse {
/**
* Fully qualified ID for the alias resource.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly id?: string;
/**
* Alias ID.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly name?: string;
/**
* Resource type, Microsoft.Subscription/aliases.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly type?: string;
/** Subscription Alias response properties. */
properties?: SubscriptionAliasResponseProperties;
/**
* Metadata pertaining to creation and last modification of the resource.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly systemData?: SystemData;
}
/** Put subscription creation result properties. */
export interface SubscriptionAliasResponseProperties {
/**
* Newly created subscription Id.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly subscriptionId?: string;
/** The display name of the subscription. */
displayName?: string;
/** The provisioning state of the resource. */
provisioningState?: ProvisioningState;
/**
* Url to accept ownership of the subscription.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly acceptOwnershipUrl?: string;
/**
* The accept ownership state of the resource.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly acceptOwnershipState?: AcceptOwnership;
/**
* Billing scope of the subscription.
* For CustomerLed and FieldLed - /billingAccounts/{billingAccountName}/billingProfiles/{billingProfileName}/invoiceSections/{invoiceSectionName}
* For PartnerLed - /billingAccounts/{billingAccountName}/customers/{customerName}
* For Legacy EA - /billingAccounts/{billingAccountName}/enrollmentAccounts/{enrollmentAccountName}
*/
billingScope?: string;
/** The workload type of the subscription. It can be either Production or DevTest. */
workload?: Workload;
/** Reseller Id */
resellerId?: string;
/** Owner Id of the subscription */
subscriptionOwnerId?: string;
/** The Management Group Id. */
managementGroupId?: string;
/** Created Time */
createdTime?: string;
/** Tags for the subscription */
tags?: {
[propertyName: string]: string;
};
}
/** Metadata pertaining to creation and last modification of the resource. */
export interface SystemData {
/** The identity that created the resource. */
createdBy?: string;
/** The type of identity that created the resource. */
createdByType?: CreatedByType;
/** The timestamp of resource creation (UTC). */
createdAt?: Date;
/** The identity that last modified the resource. */
lastModifiedBy?: string;
/** The type of identity that last modified the resource. */
lastModifiedByType?: CreatedByType;
/** The timestamp of resource last modification (UTC) */
lastModifiedAt?: Date;
}
/** The list of aliases. */
export interface SubscriptionAliasListResult {
/**
* The list of alias.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly value?: SubscriptionAliasResponse[];
/**
* The link (url) to the next page of results.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly nextLink?: string;
}
/** The parameters required to accept subscription ownership. */
export interface AcceptOwnershipRequest {
/** Accept subscription ownership request properties. */
properties?: AcceptOwnershipRequestProperties;
}
/** Accept subscription ownership request properties. */
export interface AcceptOwnershipRequestProperties {
/** The friendly name of the subscription. */
displayName: string;
/** Management group Id for the subscription. */
managementGroupId?: string;
/** Tags for the subscription */
tags?: {
[propertyName: string]: string;
};
}
/** Subscription Accept Ownership Response */
export interface AcceptOwnershipStatusResponse {
/**
* Newly created subscription Id.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly subscriptionId?: string;
/**
* The accept ownership state of the resource.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly acceptOwnershipState?: AcceptOwnership;
/**
* The provisioning state of the resource.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly provisioningState?: Provisioning;
/**
* UPN of the billing owner
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly billingOwner?: string;
/** Tenant Id of the subscription */
subscriptionTenantId?: string;
/** The display name of the subscription. */
displayName?: string;
/** Tags for the subscription */
tags?: {
[propertyName: string]: string;
};
}
/** Put tenant policy request properties. */
export interface PutTenantPolicyRequestProperties {
/** Blocks the leaving of subscriptions from user's tenant. */
blockSubscriptionsLeavingTenant?: boolean;
/** Blocks the entering of subscriptions into user's tenant. */
blockSubscriptionsIntoTenant?: boolean;
/** List of user objectIds that are exempted from the set subscription tenant policies for the user's tenant. */
exemptedPrincipals?: string[];
}
/** Tenant policy Information. */
export interface GetTenantPolicyResponse {
/**
* Policy Id.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly id?: string;
/**
* Policy name.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly name?: string;
/**
* Resource type.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly type?: string;
/** Tenant policy properties. */
properties?: TenantPolicy;
/**
* Metadata pertaining to creation and last modification of the resource.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly systemData?: SystemData;
}
/** Tenant policy. */
export interface TenantPolicy {
/**
* Policy Id.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly policyId?: string;
/** Blocks the leaving of subscriptions from user's tenant. */
blockSubscriptionsLeavingTenant?: boolean;
/** Blocks the entering of subscriptions into user's tenant. */
blockSubscriptionsIntoTenant?: boolean;
/** List of user objectIds that are exempted from the set subscription tenant policies for the user's tenant. */
exemptedPrincipals?: string[];
}
/** Tenant policy information list. */
export interface GetTenantPolicyListResponse {
/**
* The list of tenant policies.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly value?: GetTenantPolicyResponse[];
/**
* The link (url) to the next page of results.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly nextLink?: string;
}
/** Billing account policies information. */
export interface BillingAccountPoliciesResponse {
/**
* Fully qualified ID for the policy.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly id?: string;
/**
* Policy name.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly name?: string;
/**
* Resource type.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly type?: string;
/** Billing account policies response properties. */
properties?: BillingAccountPoliciesResponseProperties;
/**
* Metadata pertaining to creation and last modification of the resource.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly systemData?: SystemData;
}
/** Put billing account policies response properties. */
export interface BillingAccountPoliciesResponseProperties {
/** Service tenant for the billing account. */
serviceTenants?: ServiceTenantResponse[];
/** Determine if the transfers are allowed for the billing account */
allowTransfers?: boolean;
}
/** Billing account service tenant. */
export interface ServiceTenantResponse {
/** Service tenant id. */
tenantId?: string;
/** Service tenant name. */
tenantName?: string;
}
/** Defines headers for Subscription_acceptOwnership operation. */
export interface SubscriptionAcceptOwnershipHeaders {
/** GET this URL to retrieve the status of the asynchronous operation. */
location?: string;
/** The amount of delay to use while the status of the operation is checked. The value is expressed in seconds. */
retryAfter?: number;
}
/** Known values of {@link Workload} that the service accepts. */
export declare enum KnownWorkload {
/** Production */
Production = "Production",
/** DevTest */
DevTest = "DevTest"
}
/**
* Defines values for Workload. \
* {@link KnownWorkload} can be used interchangeably with Workload,
* this enum contains the known values that the service supports.
* ### Known values supported by the service
* **Production** \
* **DevTest**
*/
export declare type Workload = string;
/** Known values of {@link ProvisioningState} that the service accepts. */
export declare enum KnownProvisioningState {
/** Accepted */
Accepted = "Accepted",
/** Succeeded */
Succeeded = "Succeeded",
/** Failed */
Failed = "Failed"
}
/**
* Defines values for ProvisioningState. \
* {@link KnownProvisioningState} can be used interchangeably with ProvisioningState,
* this enum contains the known values that the service supports.
* ### Known values supported by the service
* **Accepted** \
* **Succeeded** \
* **Failed**
*/
export declare type ProvisioningState = string;
/** Known values of {@link AcceptOwnership} that the service accepts. */
export declare enum KnownAcceptOwnership {
/** Pending */
Pending = "Pending",
/** Completed */
Completed = "Completed",
/** Expired */
Expired = "Expired"
}
/**
* Defines values for AcceptOwnership. \
* {@link KnownAcceptOwnership} can be used interchangeably with AcceptOwnership,
* this enum contains the known values that the service supports.
* ### Known values supported by the service
* **Pending** \
* **Completed** \
* **Expired**
*/
export declare type AcceptOwnership = string;
/** Known values of {@link CreatedByType} that the service accepts. */
export declare enum KnownCreatedByType {
/** User */
User = "User",
/** Application */
Application = "Application",
/** ManagedIdentity */
ManagedIdentity = "ManagedIdentity",
/** Key */
Key = "Key"
}
/**
* Defines values for CreatedByType. \
* {@link KnownCreatedByType} can be used interchangeably with CreatedByType,
* this enum contains the known values that the service supports.
* ### Known values supported by the service
* **User** \
* **Application** \
* **ManagedIdentity** \
* **Key**
*/
export declare type CreatedByType = string;
/** Known values of {@link Provisioning} that the service accepts. */
export declare enum KnownProvisioning {
/** Pending */
Pending = "Pending",
/** Accepted */
Accepted = "Accepted",
/** Succeeded */
Succeeded = "Succeeded"
}
/**
* Defines values for Provisioning. \
* {@link KnownProvisioning} can be used interchangeably with Provisioning,
* this enum contains the known values that the service supports.
* ### Known values supported by the service
* **Pending** \
* **Accepted** \
* **Succeeded**
*/
export declare type Provisioning = string;
/** Defines values for SubscriptionState. */
export declare type SubscriptionState = "Enabled" | "Warned" | "PastDue" | "Disabled" | "Deleted";
/** Defines values for SpendingLimit. */
export declare type SpendingLimit = "On" | "Off" | "CurrentPeriodOff";
/** Optional parameters. */
export interface SubscriptionsListLocationsOptionalParams extends coreClient.OperationOptions {
}
/** Contains response data for the listLocations operation. */
export declare type SubscriptionsListLocationsResponse = LocationListResult;
/** Optional parameters. */
export interface SubscriptionsGetOptionalParams extends coreClient.OperationOptions {
}
/** Contains response data for the get operation. */
export declare type SubscriptionsGetResponse = Subscription;
/** Optional parameters. */
export interface SubscriptionsListOptionalParams extends coreClient.OperationOptions {
}
/** Contains response data for the list operation. */
export declare type SubscriptionsListResponse = SubscriptionListResult;
/** Optional parameters. */
export interface SubscriptionsListNextOptionalParams extends coreClient.OperationOptions {
}
/** Contains response data for the listNext operation. */
export declare type SubscriptionsListNextResponse = SubscriptionListResult;
/** Optional parameters. */
export interface TenantsListOptionalParams extends coreClient.OperationOptions {
}
/** Contains response data for the list operation. */
export declare type TenantsListResponse = TenantListResult;
/** Optional parameters. */
export interface TenantsListNextOptionalParams extends coreClient.OperationOptions {
}
/** Contains response data for the listNext operation. */
export declare type TenantsListNextResponse = TenantListResult;
/** Optional parameters. */
export interface SubscriptionCancelOptionalParams extends coreClient.OperationOptions {
}
/** Contains response data for the cancel operation. */
export declare type SubscriptionCancelResponse = CanceledSubscriptionId;
/** Optional parameters. */
export interface SubscriptionRenameOptionalParams extends coreClient.OperationOptions {
}
/** Contains response data for the rename operation. */
export declare type SubscriptionRenameResponse = RenamedSubscriptionId;
/** Optional parameters. */
export interface SubscriptionEnableOptionalParams extends coreClient.OperationOptions {
}
/** Contains response data for the enable operation. */
export declare type SubscriptionEnableResponse = EnabledSubscriptionId;
/** Optional parameters. */
export interface SubscriptionAcceptOwnershipOptionalParams extends coreClient.OperationOptions {
/** Delay to wait until next poll, in milliseconds. */
updateIntervalInMs?: number;
/** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */
resumeFrom?: string;
}
/** Contains response data for the acceptOwnership operation. */
export declare type SubscriptionAcceptOwnershipResponse = SubscriptionAcceptOwnershipHeaders;
/** Optional parameters. */
export interface SubscriptionAcceptOwnershipStatusOptionalParams extends coreClient.OperationOptions {
}
/** Contains response data for the acceptOwnershipStatus operation. */
export declare type SubscriptionAcceptOwnershipStatusResponse = AcceptOwnershipStatusResponse;
/** Optional parameters. */
export interface OperationsListOptionalParams extends coreClient.OperationOptions {
}
/** Contains response data for the list operation. */
export declare type OperationsListResponse = OperationListResult;
/** Optional parameters. */
export interface OperationsListNextOptionalParams extends coreClient.OperationOptions {
}
/** Contains response data for the listNext operation. */
export declare type OperationsListNextResponse = OperationListResult;
/** Optional parameters. */
export interface AliasCreateOptionalParams extends coreClient.OperationOptions {
/** Delay to wait until next poll, in milliseconds. */
updateIntervalInMs?: number;
/** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */
resumeFrom?: string;
}
/** Contains response data for the create operation. */
export declare type AliasCreateResponse = SubscriptionAliasResponse;
/** Optional parameters. */
export interface AliasGetOptionalParams extends coreClient.OperationOptions {
}
/** Contains response data for the get operation. */
export declare type AliasGetResponse = SubscriptionAliasResponse;
/** Optional parameters. */
export interface AliasDeleteOptionalParams extends coreClient.OperationOptions {
}
/** Optional parameters. */
export interface AliasListOptionalParams extends coreClient.OperationOptions {
}
/** Contains response data for the list operation. */
export declare type AliasListResponse = SubscriptionAliasListResult;
/** Optional parameters. */
export interface SubscriptionPolicyAddUpdatePolicyForTenantOptionalParams extends coreClient.OperationOptions {
}
/** Contains response data for the addUpdatePolicyForTenant operation. */
export declare type SubscriptionPolicyAddUpdatePolicyForTenantResponse = GetTenantPolicyResponse;
/** Optional parameters. */
export interface SubscriptionPolicyGetPolicyForTenantOptionalParams extends coreClient.OperationOptions {
}
/** Contains response data for the getPolicyForTenant operation. */
export declare type SubscriptionPolicyGetPolicyForTenantResponse = GetTenantPolicyResponse;
/** Optional parameters. */
export interface SubscriptionPolicyListPolicyForTenantOptionalParams extends coreClient.OperationOptions {
}
/** Contains response data for the listPolicyForTenant operation. */
export declare type SubscriptionPolicyListPolicyForTenantResponse = GetTenantPolicyListResponse;
/** Optional parameters. */
export interface SubscriptionPolicyListPolicyForTenantNextOptionalParams extends coreClient.OperationOptions {
}
/** Contains response data for the listPolicyForTenantNext operation. */
export declare type SubscriptionPolicyListPolicyForTenantNextResponse = GetTenantPolicyListResponse;
/** Optional parameters. */
export interface BillingAccountGetPolicyOptionalParams extends coreClient.OperationOptions {
}
/** Contains response data for the getPolicy operation. */
export declare type BillingAccountGetPolicyResponse = BillingAccountPoliciesResponse;
/** Optional parameters. */
export interface SubscriptionClientOptionalParams extends coreClient.ServiceClientOptions {
/** server parameter */
$host?: string;
/** Overrides client endpoint. */
endpoint?: string;
}
//# sourceMappingURL=index.d.ts.map
File diff suppressed because one or more lines are too long
+58
View File
@@ -0,0 +1,58 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
/** Known values of {@link Workload} that the service accepts. */
export var KnownWorkload;
(function (KnownWorkload) {
/** Production */
KnownWorkload["Production"] = "Production";
/** DevTest */
KnownWorkload["DevTest"] = "DevTest";
})(KnownWorkload || (KnownWorkload = {}));
/** Known values of {@link ProvisioningState} that the service accepts. */
export var KnownProvisioningState;
(function (KnownProvisioningState) {
/** Accepted */
KnownProvisioningState["Accepted"] = "Accepted";
/** Succeeded */
KnownProvisioningState["Succeeded"] = "Succeeded";
/** Failed */
KnownProvisioningState["Failed"] = "Failed";
})(KnownProvisioningState || (KnownProvisioningState = {}));
/** Known values of {@link AcceptOwnership} that the service accepts. */
export var KnownAcceptOwnership;
(function (KnownAcceptOwnership) {
/** Pending */
KnownAcceptOwnership["Pending"] = "Pending";
/** Completed */
KnownAcceptOwnership["Completed"] = "Completed";
/** Expired */
KnownAcceptOwnership["Expired"] = "Expired";
})(KnownAcceptOwnership || (KnownAcceptOwnership = {}));
/** Known values of {@link CreatedByType} that the service accepts. */
export var KnownCreatedByType;
(function (KnownCreatedByType) {
/** User */
KnownCreatedByType["User"] = "User";
/** Application */
KnownCreatedByType["Application"] = "Application";
/** ManagedIdentity */
KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
/** Key */
KnownCreatedByType["Key"] = "Key";
})(KnownCreatedByType || (KnownCreatedByType = {}));
/** Known values of {@link Provisioning} that the service accepts. */
export var KnownProvisioning;
(function (KnownProvisioning) {
/** Pending */
KnownProvisioning["Pending"] = "Pending";
/** Accepted */
KnownProvisioning["Accepted"] = "Accepted";
/** Succeeded */
KnownProvisioning["Succeeded"] = "Succeeded";
})(KnownProvisioning || (KnownProvisioning = {}));
//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA8hBH,iEAAiE;AACjE,MAAM,CAAN,IAAY,aAKX;AALD,WAAY,aAAa;IACvB,iBAAiB;IACjB,0CAAyB,CAAA;IACzB,cAAc;IACd,oCAAmB,CAAA;AACrB,CAAC,EALW,aAAa,KAAb,aAAa,QAKxB;AAYD,0EAA0E;AAC1E,MAAM,CAAN,IAAY,sBAOX;AAPD,WAAY,sBAAsB;IAChC,eAAe;IACf,+CAAqB,CAAA;IACrB,gBAAgB;IAChB,iDAAuB,CAAA;IACvB,aAAa;IACb,2CAAiB,CAAA;AACnB,CAAC,EAPW,sBAAsB,KAAtB,sBAAsB,QAOjC;AAaD,wEAAwE;AACxE,MAAM,CAAN,IAAY,oBAOX;AAPD,WAAY,oBAAoB;IAC9B,cAAc;IACd,2CAAmB,CAAA;IACnB,gBAAgB;IAChB,+CAAuB,CAAA;IACvB,cAAc;IACd,2CAAmB,CAAA;AACrB,CAAC,EAPW,oBAAoB,KAApB,oBAAoB,QAO/B;AAaD,sEAAsE;AACtE,MAAM,CAAN,IAAY,kBASX;AATD,WAAY,kBAAkB;IAC5B,WAAW;IACX,mCAAa,CAAA;IACb,kBAAkB;IAClB,iDAA2B,CAAA;IAC3B,sBAAsB;IACtB,yDAAmC,CAAA;IACnC,UAAU;IACV,iCAAW,CAAA;AACb,CAAC,EATW,kBAAkB,KAAlB,kBAAkB,QAS7B;AAcD,qEAAqE;AACrE,MAAM,CAAN,IAAY,iBAOX;AAPD,WAAY,iBAAiB;IAC3B,cAAc;IACd,wCAAmB,CAAA;IACnB,eAAe;IACf,0CAAqB,CAAA;IACrB,gBAAgB;IAChB,4CAAuB,CAAA;AACzB,CAAC,EAPW,iBAAiB,KAAjB,iBAAiB,QAO5B"}
+36
View File
@@ -0,0 +1,36 @@
import * as coreClient from "@azure/core-client";
export declare const LocationListResult: coreClient.CompositeMapper;
export declare const Location: coreClient.CompositeMapper;
export declare const Subscription: coreClient.CompositeMapper;
export declare const SubscriptionPolicies: coreClient.CompositeMapper;
export declare const SubscriptionListResult: coreClient.CompositeMapper;
export declare const TenantListResult: coreClient.CompositeMapper;
export declare const TenantIdDescription: coreClient.CompositeMapper;
export declare const CanceledSubscriptionId: coreClient.CompositeMapper;
export declare const ErrorResponseBody: coreClient.CompositeMapper;
export declare const ErrorResponse: coreClient.CompositeMapper;
export declare const SubscriptionName: coreClient.CompositeMapper;
export declare const RenamedSubscriptionId: coreClient.CompositeMapper;
export declare const EnabledSubscriptionId: coreClient.CompositeMapper;
export declare const OperationListResult: coreClient.CompositeMapper;
export declare const Operation: coreClient.CompositeMapper;
export declare const OperationDisplay: coreClient.CompositeMapper;
export declare const PutAliasRequest: coreClient.CompositeMapper;
export declare const PutAliasRequestProperties: coreClient.CompositeMapper;
export declare const PutAliasRequestAdditionalProperties: coreClient.CompositeMapper;
export declare const SubscriptionAliasResponse: coreClient.CompositeMapper;
export declare const SubscriptionAliasResponseProperties: coreClient.CompositeMapper;
export declare const SystemData: coreClient.CompositeMapper;
export declare const SubscriptionAliasListResult: coreClient.CompositeMapper;
export declare const AcceptOwnershipRequest: coreClient.CompositeMapper;
export declare const AcceptOwnershipRequestProperties: coreClient.CompositeMapper;
export declare const AcceptOwnershipStatusResponse: coreClient.CompositeMapper;
export declare const PutTenantPolicyRequestProperties: coreClient.CompositeMapper;
export declare const GetTenantPolicyResponse: coreClient.CompositeMapper;
export declare const TenantPolicy: coreClient.CompositeMapper;
export declare const GetTenantPolicyListResponse: coreClient.CompositeMapper;
export declare const BillingAccountPoliciesResponse: coreClient.CompositeMapper;
export declare const BillingAccountPoliciesResponseProperties: coreClient.CompositeMapper;
export declare const ServiceTenantResponse: coreClient.CompositeMapper;
export declare const SubscriptionAcceptOwnershipHeaders: coreClient.CompositeMapper;
//# sourceMappingURL=mappers.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"mappers.d.ts","source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AC,eA0ClD,CAAC;AAEF,eAAO,MAAM,mCAAmC,EAAE,UAAU,CAAC,eAmF5D,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,UAAU,CAAC,eA2CnC,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,UAAU,CAAC,eA2BpD,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,UAAU,CAAC,eAc/C,CAAC;AAEF,eAAO,MAAM,gCAAgC,EAAE,UAAU,CAAC,eA2BzD,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,UAAU,CAAC,eAsDtD,CAAC;AAEF,eAAO,MAAM,gCAAgC,EAAE,UAAU,CAAC,eA8BzD,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,UAAU,CAAC,eA0ChD,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,UAAU,CAAC,eAqCrC,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,UAAU,CAAC,eA2BpD,CAAC;AAEF,eAAO,MAAM,8BAA8B,EAAE,UAAU,CAAC,eA0CvD,CAAC;AAEF,eAAO,MAAM,wCAAwC,EAAE,UAAU,CAAC,eAyBjE,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,UAAU,CAAC,eAmB9C,CAAC;AAEF,eAAO,MAAM,kCAAkC,EAAE,UAAU,CAAC,eAmB3D,CAAC"}
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,15 @@
import { OperationParameter, OperationURLParameter, OperationQueryParameter } from "@azure/core-client";
export declare const accept: OperationParameter;
export declare const $host: OperationURLParameter;
export declare const subscriptionId: OperationURLParameter;
export declare const apiVersion: OperationQueryParameter;
export declare const nextLink: OperationURLParameter;
export declare const apiVersion1: OperationQueryParameter;
export declare const contentType: OperationParameter;
export declare const body: OperationParameter;
export declare const body1: OperationParameter;
export declare const body2: OperationParameter;
export declare const aliasName: OperationURLParameter;
export declare const body3: OperationParameter;
export declare const billingAccountId: OperationURLParameter;
//# sourceMappingURL=parameters.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"parameters.d.ts","sourceRoot":"","sources":["../../../src/models/parameters.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,oBAAoB,CAAC;AAQ5B,eAAO,MAAM,MAAM,EAAE,kBAUpB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,qBAUnB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,qBAS5B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,uBAUxB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,qBAUtB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,uBAUzB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,kBAUzB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,kBAGlB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,kBAGnB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,kBAGnB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,qBASvB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,kBAGnB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,qBAS9B,CAAC"}
+121
View File
@@ -0,0 +1,121 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { SubscriptionName as SubscriptionNameMapper, AcceptOwnershipRequest as AcceptOwnershipRequestMapper, PutAliasRequest as PutAliasRequestMapper, PutTenantPolicyRequestProperties as PutTenantPolicyRequestPropertiesMapper } from "../models/mappers";
export const accept = {
parameterPath: "accept",
mapper: {
defaultValue: "application/json",
isConstant: true,
serializedName: "Accept",
type: {
name: "String"
}
}
};
export const $host = {
parameterPath: "$host",
mapper: {
serializedName: "$host",
required: true,
type: {
name: "String"
}
},
skipEncoding: true
};
export const subscriptionId = {
parameterPath: "subscriptionId",
mapper: {
serializedName: "subscriptionId",
required: true,
type: {
name: "String"
}
}
};
export const apiVersion = {
parameterPath: "apiVersion",
mapper: {
defaultValue: "2016-06-01",
isConstant: true,
serializedName: "api-version",
type: {
name: "String"
}
}
};
export const nextLink = {
parameterPath: "nextLink",
mapper: {
serializedName: "nextLink",
required: true,
type: {
name: "String"
}
},
skipEncoding: true
};
export const apiVersion1 = {
parameterPath: "apiVersion",
mapper: {
defaultValue: "2021-10-01",
isConstant: true,
serializedName: "api-version",
type: {
name: "String"
}
}
};
export const contentType = {
parameterPath: ["options", "contentType"],
mapper: {
defaultValue: "application/json",
isConstant: true,
serializedName: "Content-Type",
type: {
name: "String"
}
}
};
export const body = {
parameterPath: "body",
mapper: SubscriptionNameMapper
};
export const body1 = {
parameterPath: "body",
mapper: AcceptOwnershipRequestMapper
};
export const body2 = {
parameterPath: "body",
mapper: PutAliasRequestMapper
};
export const aliasName = {
parameterPath: "aliasName",
mapper: {
serializedName: "aliasName",
required: true,
type: {
name: "String"
}
}
};
export const body3 = {
parameterPath: "body",
mapper: PutTenantPolicyRequestPropertiesMapper
};
export const billingAccountId = {
parameterPath: "billingAccountId",
mapper: {
serializedName: "billingAccountId",
required: true,
type: {
name: "String"
}
}
};
//# sourceMappingURL=parameters.js.map
@@ -0,0 +1 @@
{"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../src/models/parameters.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,OAAO,EACL,gBAAgB,IAAI,sBAAsB,EAC1C,sBAAsB,IAAI,4BAA4B,EACtD,eAAe,IAAI,qBAAqB,EACxC,gCAAgC,IAAI,sCAAsC,EAC3E,MAAM,mBAAmB,CAAC;AAE3B,MAAM,CAAC,MAAM,MAAM,GAAuB;IACxC,aAAa,EAAE,QAAQ;IACvB,MAAM,EAAE;QACN,YAAY,EAAE,kBAAkB;QAChC,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,QAAQ;QACxB,IAAI,EAA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E,kBAAkB;QAChC,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,cAAc;QAC9B,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAuB;IACtC,aAAa,EAAE,MAAM;IACrB,MAAM,EAAE,sBAAsB;CAC/B,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAuB;IACvC,aAAa,EAAE,MAAM;IACrB,MAAM,EAAE,4BAA4B;CACrC,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAuB;IACvC,aAAa,EAAE,MAAM;IACrB,MAAM,EAAE,qBAAqB;CAC9B,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAA0B;IAC9C,aAAa,EAAE,WAAW;IAC1B,MAAM,EAAE;QACN,cAAc,EAAE,WAAW;QAC3B,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAuB;IACvC,aAAa,EAAE,MAAM;IACrB,MAAM,EAAE,sCAAsC;CAC/C,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAA0B;IACrD,aAAa,EAAE,kBAAkB;IACjC,MAAM,EAAE;QACN,cAAc,EAAE,kBAAkB;QAClC,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC"}
@@ -0,0 +1,53 @@
import { Alias } from "../operationsInterfaces";
import { SubscriptionClient } from "../subscriptionClient";
import { PollerLike, PollOperationState } from "@azure/core-lro";
import { PutAliasRequest, AliasCreateOptionalParams, AliasCreateResponse, AliasGetOptionalParams, AliasGetResponse, AliasDeleteOptionalParams, AliasListOptionalParams, AliasListResponse } from "../models";
/** Class containing Alias operations. */
export declare class AliasImpl implements Alias {
private readonly client;
/**
* Initialize a new instance of the class Alias class.
* @param client Reference to the service client
*/
constructor(client: SubscriptionClient);
/**
* Create Alias Subscription.
* @param aliasName AliasName is the name for the subscription creation request. Note that this is not
* the same as subscription name and this doesnt have any other lifecycle need beyond the request for
* subscription creation.
* @param body The parameters required to create a new subscription.
* @param options The options parameters.
*/
beginCreate(aliasName: string, body: PutAliasRequest, options?: AliasCreateOptionalParams): Promise<PollerLike<PollOperationState<AliasCreateResponse>, AliasCreateResponse>>;
/**
* Create Alias Subscription.
* @param aliasName AliasName is the name for the subscription creation request. Note that this is not
* the same as subscription name and this doesnt have any other lifecycle need beyond the request for
* subscription creation.
* @param body The parameters required to create a new subscription.
* @param options The options parameters.
*/
beginCreateAndWait(aliasName: string, body: PutAliasRequest, options?: AliasCreateOptionalParams): Promise<AliasCreateResponse>;
/**
* Get Alias Subscription.
* @param aliasName AliasName is the name for the subscription creation request. Note that this is not
* the same as subscription name and this doesnt have any other lifecycle need beyond the request for
* subscription creation.
* @param options The options parameters.
*/
get(aliasName: string, options?: AliasGetOptionalParams): Promise<AliasGetResponse>;
/**
* Delete Alias.
* @param aliasName AliasName is the name for the subscription creation request. Note that this is not
* the same as subscription name and this doesnt have any other lifecycle need beyond the request for
* subscription creation.
* @param options The options parameters.
*/
delete(aliasName: string, options?: AliasDeleteOptionalParams): Promise<void>;
/**
* List Alias Subscription.
* @param options The options parameters.
*/
list(options?: AliasListOptionalParams): Promise<AliasListResponse>;
}
//# sourceMappingURL=alias.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"alias.d.ts","sourceRoot":"","sources":["../../../src/operations/alias.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAIhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAa,MAAM,iBAAiB,CAAC;AAE5E,OAAO,EACL,eAAe,EACf,yBAAyB,EACzB,mBAAmB,EACnB,sBAAsB,EACtB,gBAAgB,EAChB,yBAAyB,EACzB,uBAAuB,EACvB,iBAAiB,EAClB,MAAM,WAAW,CAAC;AAEnB,yCAAyC;AACzC,qBAAa,SAAU,YAAW,KAAK;IACrC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAE5C;;;OAGG;gBACS,MAAM,EAAE,kBAAkB;IAItC;;;;;;;OAOG;IACG,WAAW,CACf,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,eAAe,EACrB,OAAO,CAAC,EAAE,yBAAyB,GAClC,OAAO,CACR,UAAU,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC,CACzE;IAqDD;;;;;;;OAOG;IACG,kBAAkB,CACtB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,eAAe,EACrB,OAAO,CAAC,EAAE,yBAAyB,GAClC,OAAO,CAAC,mBAAmB,CAAC;IAK/B;;;;;;OAMG;IACH,GAAG,CACD,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,sBAAsB,GAC/B,OAAO,CAAC,gBAAgB,CAAC;IAO5B;;;;;;OAMG;IACH,MAAM,CACJ,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,yBAAyB,GAClC,OAAO,CAAC,IAAI,CAAC;IAOhB;;;OAGG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAGpE"}
+182
View File
@@ -0,0 +1,182 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { __awaiter } from "tslib";
import * as coreClient from "@azure/core-client";
import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
import { LroEngine } from "@azure/core-lro";
import { LroImpl } from "../lroImpl";
/** Class containing Alias operations. */
export class AliasImpl {
/**
* Initialize a new instance of the class Alias class.
* @param client Reference to the service client
*/
constructor(client) {
this.client = client;
}
/**
* Create Alias Subscription.
* @param aliasName AliasName is the name for the subscription creation request. Note that this is not
* the same as subscription name and this doesnt have any other lifecycle need beyond the request for
* subscription creation.
* @param body The parameters required to create a new subscription.
* @param options The options parameters.
*/
beginCreate(aliasName, body, options) {
return __awaiter(this, void 0, void 0, function* () {
const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
return this.client.sendOperationRequest(args, spec);
});
const sendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
var _a;
let currentRawResponse = undefined;
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
const callback = (rawResponse, flatResponse) => {
currentRawResponse = rawResponse;
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
};
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
const flatResponse = yield directSendOperation(updatedArgs, spec);
return {
flatResponse,
rawResponse: {
statusCode: currentRawResponse.status,
body: currentRawResponse.parsedBody,
headers: currentRawResponse.headers.toJSON()
}
};
});
const lro = new LroImpl(sendOperation, { aliasName, body, options }, createOperationSpec);
const poller = new LroEngine(lro, {
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
});
yield poller.poll();
return poller;
});
}
/**
* Create Alias Subscription.
* @param aliasName AliasName is the name for the subscription creation request. Note that this is not
* the same as subscription name and this doesnt have any other lifecycle need beyond the request for
* subscription creation.
* @param body The parameters required to create a new subscription.
* @param options The options parameters.
*/
beginCreateAndWait(aliasName, body, options) {
return __awaiter(this, void 0, void 0, function* () {
const poller = yield this.beginCreate(aliasName, body, options);
return poller.pollUntilDone();
});
}
/**
* Get Alias Subscription.
* @param aliasName AliasName is the name for the subscription creation request. Note that this is not
* the same as subscription name and this doesnt have any other lifecycle need beyond the request for
* subscription creation.
* @param options The options parameters.
*/
get(aliasName, options) {
return this.client.sendOperationRequest({ aliasName, options }, getOperationSpec);
}
/**
* Delete Alias.
* @param aliasName AliasName is the name for the subscription creation request. Note that this is not
* the same as subscription name and this doesnt have any other lifecycle need beyond the request for
* subscription creation.
* @param options The options parameters.
*/
delete(aliasName, options) {
return this.client.sendOperationRequest({ aliasName, options }, deleteOperationSpec);
}
/**
* List Alias Subscription.
* @param options The options parameters.
*/
list(options) {
return this.client.sendOperationRequest({ options }, listOperationSpec);
}
}
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const createOperationSpec = {
path: "/providers/Microsoft.Subscription/aliases/{aliasName}",
httpMethod: "PUT",
responses: {
200: {
bodyMapper: Mappers.SubscriptionAliasResponse
},
201: {
bodyMapper: Mappers.SubscriptionAliasResponse
},
202: {
bodyMapper: Mappers.SubscriptionAliasResponse
},
204: {
bodyMapper: Mappers.SubscriptionAliasResponse
},
default: {
bodyMapper: Mappers.ErrorResponseBody
}
},
requestBody: Parameters.body2,
queryParameters: [Parameters.apiVersion1],
urlParameters: [Parameters.$host, Parameters.aliasName],
headerParameters: [Parameters.accept, Parameters.contentType],
mediaType: "json",
serializer
};
const getOperationSpec = {
path: "/providers/Microsoft.Subscription/aliases/{aliasName}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.SubscriptionAliasResponse
},
default: {
bodyMapper: Mappers.ErrorResponseBody
}
},
queryParameters: [Parameters.apiVersion1],
urlParameters: [Parameters.$host, Parameters.aliasName],
headerParameters: [Parameters.accept],
serializer
};
const deleteOperationSpec = {
path: "/providers/Microsoft.Subscription/aliases/{aliasName}",
httpMethod: "DELETE",
responses: {
200: {},
204: {},
default: {
bodyMapper: Mappers.ErrorResponseBody
}
},
queryParameters: [Parameters.apiVersion1],
urlParameters: [Parameters.$host, Parameters.aliasName],
headerParameters: [Parameters.accept],
serializer
};
const listOperationSpec = {
path: "/providers/Microsoft.Subscription/aliases",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.SubscriptionAliasListResult
},
default: {
bodyMapper: Mappers.ErrorResponseBody
}
},
queryParameters: [Parameters.apiVersion1],
urlParameters: [Parameters.$host],
headerParameters: [Parameters.accept],
serializer
};
//# sourceMappingURL=alias.js.map
@@ -0,0 +1 @@
{"version":3,"file":"alias.js","sourceRoot":"","sources":["../../../src/operations/alias.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAEnD,OAAO,EAAkC,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAYrC,yCAAyC;AACzC,MAAM,OAAO,SAAS;IAGpB;;;OAGG;IACH,YAAY,MAA0B;QACpC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;OAOG;IACG,WAAW,CACf,SAAiB,EACjB,IAAqB,EACrB,OAAmC;;YAInC,MAAM,mBAAmB,GAAG,CAC1B,IAAmC,EACnC,IAA8B,EACA,EAAE;gBAChC,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACtD,CAAC,CAAA,CAAC;YACF,MAAM,aAAa,GAAG,CACpB,IAAmC,EACnC,IAA8B,EAC9B,EAAE;;gBACF,IAAI,kBAAkB,GAEN,SAAS,CAAC;gBAC1B,MAAM,gBAAgB,GAAG,MAAA,IAAI,CAAC,OAAO,0CAAE,UAAU,CAAC;gBAClD,MAAM,QAAQ,GAAmC,CAC/C,WAA6C,EAC7C,YAAqB,EACrB,EAAE;oBACF,kBAAkB,GAAG,WAAW,CAAC;oBACjC,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAG,WAAW,EAAE,YAAY,CAAC,CAAC;gBAChD,CAAC,CAAC;gBACF,MAAM,WAAW,mCACZ,IAAI,KACP,OAAO,kCACF,IAAI,CAAC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,OAAO,CAAC,iBAAiB;SACtC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,SAAS,CAAC;IACvD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,mBAAmB,GAA6B;IACpD,IAAI,EAAE,uDAAuD;IAC7D,UAAU,EAAE,QAAQ;IACpB,SAAS,EAAE;QACT,GAAG,EAAE,EAAE;QACP,GAAG,EAAE,EAAE;QACP,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,iBAAiB;SACtC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,SAAS,CAAC;IACvD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,2CAA2C;IACjD,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,2BAA2B;SAChD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,iBAAiB;SACtC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;IACjC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC"}
@@ -0,0 +1,19 @@
import { BillingAccount } from "../operationsInterfaces";
import { SubscriptionClient } from "../subscriptionClient";
import { BillingAccountGetPolicyOptionalParams, BillingAccountGetPolicyResponse } from "../models";
/** Class containing BillingAccount operations. */
export declare class BillingAccountImpl implements BillingAccount {
private readonly client;
/**
* Initialize a new instance of the class BillingAccount class.
* @param client Reference to the service client
*/
constructor(client: SubscriptionClient);
/**
* Get Billing Account Policy.
* @param billingAccountId Billing Account Id.
* @param options The options parameters.
*/
getPolicy(billingAccountId: string, options?: BillingAccountGetPolicyOptionalParams): Promise<BillingAccountGetPolicyResponse>;
}
//# sourceMappingURL=billingAccount.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"billingAccount.d.ts","sourceRoot":"","sources":["../../../src/operations/billingAccount.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAIzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EACL,qCAAqC,EACrC,+BAA+B,EAChC,MAAM,WAAW,CAAC;AAEnB,kDAAkD;AAClD,qBAAa,kBAAmB,YAAW,cAAc;IACvD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAE5C;;;OAGG;gBACS,MAAM,EAAE,kBAAkB;IAItC;;;;OAIG;IACH,SAAS,CACP,gBAAgB,EAAE,MAAM,EACxB,OAAO,CAAC,EAAE,qCAAqC,GAC9C,OAAO,CAAC,+BAA+B,CAAC;CAM5C"}
@@ -0,0 +1,47 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import * as coreClient from "@azure/core-client";
import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
/** Class containing BillingAccount operations. */
export class BillingAccountImpl {
/**
* Initialize a new instance of the class BillingAccount class.
* @param client Reference to the service client
*/
constructor(client) {
this.client = client;
}
/**
* Get Billing Account Policy.
* @param billingAccountId Billing Account Id.
* @param options The options parameters.
*/
getPolicy(billingAccountId, options) {
return this.client.sendOperationRequest({ billingAccountId, options }, getPolicyOperationSpec);
}
}
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const getPolicyOperationSpec = {
path: "/providers/Microsoft.Billing/billingAccounts/{billingAccountId}/providers/Microsoft.Subscription/policies/default",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.BillingAccountPoliciesResponse
},
default: {
bodyMapper: Mappers.ErrorResponseBody
}
},
queryParameters: [Parameters.apiVersion1],
urlParameters: [Parameters.$host, Parameters.billingAccountId],
headerParameters: [Parameters.accept],
serializer
};
//# sourceMappingURL=billingAccount.js.map
@@ -0,0 +1 @@
{"version":3,"file":"billingAccount.js","sourceRoot":"","sources":["../../../src/operations/billingAccount.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAOnD,kDAAkD;AAClD,MAAM,OAAO,kBAAkB;IAG7B;;;OAGG;IACH,YAAY,MAA0B;QACpC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,SAAS,CACP,gBAAwB,EACxB,OAA+C;QAE/C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,gBAAgB,EAAE,OAAO,EAAE,EAC7B,sBAAsB,CACvB,CAAC;IACJ,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,sBAAsB,GAA6B;IACvD,IAAI,EACF,mHAAmH;IACrH,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,8BAA8B;SACnD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,iBAAiB;SACtC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,gBAAgB,CAAC;IAC9D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC"}
@@ -0,0 +1,8 @@
export * from "./subscriptions";
export * from "./tenants";
export * from "./subscriptionOperations";
export * from "./operations";
export * from "./alias";
export * from "./subscriptionPolicy";
export * from "./billingAccount";
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/operations/index.ts"],"names":[],"mappings":"AAQA,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,0BAA0B,CAAC;AACzC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC"}
+15
View File
@@ -0,0 +1,15 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
export * from "./subscriptions";
export * from "./tenants";
export * from "./subscriptionOperations";
export * from "./operations";
export * from "./alias";
export * from "./subscriptionPolicy";
export * from "./billingAccount";
//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/operations/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,0BAA0B,CAAC;AACzC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,32 @@
import { PagedAsyncIterableIterator } from "@azure/core-paging";
import { Operations } from "../operationsInterfaces";
import { SubscriptionClient } from "../subscriptionClient";
import { Operation, OperationsListOptionalParams } from "../models";
/** Class containing Operations operations. */
export declare class OperationsImpl implements Operations {
private readonly client;
/**
* Initialize a new instance of the class Operations class.
* @param client Reference to the service client
*/
constructor(client: SubscriptionClient);
/**
* Lists all of the available Microsoft.Subscription API operations.
* @param options The options parameters.
*/
list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator<Operation>;
private listPagingPage;
private listPagingAll;
/**
* Lists all of the available Microsoft.Subscription API operations.
* @param options The options parameters.
*/
private _list;
/**
* ListNext
* @param nextLink The nextLink from the previous successful call to the List method.
* @param options The options parameters.
*/
private _listNext;
}
//# sourceMappingURL=operations.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../src/operations/operations.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,0BAA0B,EAAgB,MAAM,oBAAoB,CAAC;AAE9E,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAIrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EACL,SAAS,EAET,4BAA4B,EAG7B,MAAM,WAAW,CAAC;AAGnB,8CAA8C;AAC9C,qBAAa,cAAe,YAAW,UAAU;IAC/C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAE5C;;;OAGG;gBACS,MAAM,EAAE,kBAAkB;IAItC;;;OAGG;IACI,IAAI,CACT,OAAO,CAAC,EAAE,4BAA4B,GACrC,0BAA0B,CAAC,SAAS,CAAC;YAkBzB,cAAc;YAsBd,aAAa;IAQ5B;;;OAGG;IACH,OAAO,CAAC,KAAK;IAMb;;;;OAIG;IACH,OAAO,CAAC,SAAS;CASlB"}
@@ -0,0 +1,132 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
import { setContinuationToken } from "../pagingHelper";
import * as coreClient from "@azure/core-client";
import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
/// <reference lib="esnext.asynciterable" />
/** Class containing Operations operations. */
export class OperationsImpl {
/**
* Initialize a new instance of the class Operations class.
* @param client Reference to the service client
*/
constructor(client) {
this.client = client;
}
/**
* Lists all of the available Microsoft.Subscription API operations.
* @param options The options parameters.
*/
list(options) {
const iter = this.listPagingAll(options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: (settings) => {
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
throw new Error("maxPageSize is not supported by this operation.");
}
return this.listPagingPage(options, settings);
}
};
}
listPagingPage(options, settings) {
return __asyncGenerator(this, arguments, function* listPagingPage_1() {
let result;
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
if (!continuationToken) {
result = yield __await(this._list(options));
let page = result.value || [];
continuationToken = result.nextLink;
setContinuationToken(page, continuationToken);
yield yield __await(page);
}
while (continuationToken) {
result = yield __await(this._listNext(continuationToken, options));
continuationToken = result.nextLink;
let page = result.value || [];
setContinuationToken(page, continuationToken);
yield yield __await(page);
}
});
}
listPagingAll(options) {
return __asyncGenerator(this, arguments, function* listPagingAll_1() {
var e_1, _a;
try {
for (var _b = __asyncValues(this.listPagingPage(options)), _c; _c = yield __await(_b.next()), !_c.done;) {
const page = _c.value;
yield __await(yield* __asyncDelegator(__asyncValues(page)));
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
}
finally { if (e_1) throw e_1.error; }
}
});
}
/**
* Lists all of the available Microsoft.Subscription API operations.
* @param options The options parameters.
*/
_list(options) {
return this.client.sendOperationRequest({ options }, listOperationSpec);
}
/**
* ListNext
* @param nextLink The nextLink from the previous successful call to the List method.
* @param options The options parameters.
*/
_listNext(nextLink, options) {
return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
}
}
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const listOperationSpec = {
path: "/providers/Microsoft.Subscription/operations",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.OperationListResult
},
default: {
bodyMapper: Mappers.ErrorResponseBody
}
},
queryParameters: [Parameters.apiVersion1],
urlParameters: [Parameters.$host],
headerParameters: [Parameters.accept],
serializer
};
const listNextOperationSpec = {
path: "{nextLink}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.OperationListResult
},
default: {
bodyMapper: Mappers.ErrorResponseBody
}
},
queryParameters: [Parameters.apiVersion1],
urlParameters: [Parameters.$host, Parameters.nextLink],
headerParameters: [Parameters.accept],
serializer
};
//# sourceMappingURL=operations.js.map
@@ -0,0 +1 @@
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operations/operations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvD,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAUnD,4CAA4C;AAC5C,8CAA8C;AAC9C,MAAM,OAAO,cAAc;IAGzB;;;OAGG;IACH,YAAY,MAA0B;QACpC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,IAAI,CACT,OAAsC;QAEtC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACzC,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE;oBACzB,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;iBACpE;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C,EAAE,OAAO,EAAE,EAAE,iBAAiB,CAAC,CAAC;IAC1E,CAAC;IAED;;;;OAIG;IACK,SAAS,CACf,QAAgB,EAChB,OAA0C;QAE1C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,QAAQ,EAAE,OAAO,EAAE,EACrB,qBAAqB,CACtB,CAAC;IACJ,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,8CAA8C;IACpD,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,iBAAiB;SACtC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;IACjC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mBAAmB;SACxC;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,iBAAiB;SACtC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;IACtD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC"}
@@ -0,0 +1,53 @@
import { SubscriptionOperations } from "../operationsInterfaces";
import { SubscriptionClient } from "../subscriptionClient";
import { PollerLike, PollOperationState } from "@azure/core-lro";
import { SubscriptionCancelOptionalParams, SubscriptionCancelResponse, SubscriptionName, SubscriptionRenameOptionalParams, SubscriptionRenameResponse, SubscriptionEnableOptionalParams, SubscriptionEnableResponse, AcceptOwnershipRequest, SubscriptionAcceptOwnershipOptionalParams, SubscriptionAcceptOwnershipResponse, SubscriptionAcceptOwnershipStatusOptionalParams, SubscriptionAcceptOwnershipStatusResponse } from "../models";
/** Class containing SubscriptionOperations operations. */
export declare class SubscriptionOperationsImpl implements SubscriptionOperations {
private readonly client;
/**
* Initialize a new instance of the class SubscriptionOperations class.
* @param client Reference to the service client
*/
constructor(client: SubscriptionClient);
/**
* The operation to cancel a subscription
* @param subscriptionId Subscription Id.
* @param options The options parameters.
*/
cancel(subscriptionId: string, options?: SubscriptionCancelOptionalParams): Promise<SubscriptionCancelResponse>;
/**
* The operation to rename a subscription
* @param subscriptionId Subscription Id.
* @param body Subscription Name
* @param options The options parameters.
*/
rename(subscriptionId: string, body: SubscriptionName, options?: SubscriptionRenameOptionalParams): Promise<SubscriptionRenameResponse>;
/**
* The operation to enable a subscription
* @param subscriptionId Subscription Id.
* @param options The options parameters.
*/
enable(subscriptionId: string, options?: SubscriptionEnableOptionalParams): Promise<SubscriptionEnableResponse>;
/**
* Accept subscription ownership.
* @param subscriptionId Subscription Id.
* @param body The parameters required to accept subscription ownership.
* @param options The options parameters.
*/
beginAcceptOwnership(subscriptionId: string, body: AcceptOwnershipRequest, options?: SubscriptionAcceptOwnershipOptionalParams): Promise<PollerLike<PollOperationState<SubscriptionAcceptOwnershipResponse>, SubscriptionAcceptOwnershipResponse>>;
/**
* Accept subscription ownership.
* @param subscriptionId Subscription Id.
* @param body The parameters required to accept subscription ownership.
* @param options The options parameters.
*/
beginAcceptOwnershipAndWait(subscriptionId: string, body: AcceptOwnershipRequest, options?: SubscriptionAcceptOwnershipOptionalParams): Promise<SubscriptionAcceptOwnershipResponse>;
/**
* Accept subscription ownership status.
* @param subscriptionId Subscription Id.
* @param options The options parameters.
*/
acceptOwnershipStatus(subscriptionId: string, options?: SubscriptionAcceptOwnershipStatusOptionalParams): Promise<SubscriptionAcceptOwnershipStatusResponse>;
}
//# sourceMappingURL=subscriptionOperations.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"subscriptionOperations.d.ts","sourceRoot":"","sources":["../../../src/operations/subscriptionOperations.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAIjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAa,MAAM,iBAAiB,CAAC;AAE5E,OAAO,EACL,gCAAgC,EAChC,0BAA0B,EAC1B,gBAAgB,EAChB,gCAAgC,EAChC,0BAA0B,EAC1B,gCAAgC,EAChC,0BAA0B,EAC1B,sBAAsB,EACtB,yCAAyC,EACzC,mCAAmC,EACnC,+CAA+C,EAC/C,yCAAyC,EAC1C,MAAM,WAAW,CAAC;AAEnB,0DAA0D;AAC1D,qBAAa,0BAA2B,YAAW,sBAAsB;IACvE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAE5C;;;OAGG;gBACS,MAAM,EAAE,kBAAkB;IAItC;;;;OAIG;IACH,MAAM,CACJ,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,gCAAgC,GACzC,OAAO,CAAC,0BAA0B,CAAC;IAOtC;;;;;OAKG;IACH,MAAM,CACJ,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,gBAAgB,EACtB,OAAO,CAAC,EAAE,gCAAgC,GACzC,OAAO,CAAC,0BAA0B,CAAC;IAOtC;;;;OAIG;IACH,MAAM,CACJ,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,gCAAgC,GACzC,OAAO,CAAC,0BAA0B,CAAC;IAOtC;;;;;OAKG;IACG,oBAAoB,CACxB,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,sBAAsB,EAC5B,OAAO,CAAC,EAAE,yCAAyC,GAClD,OAAO,CACR,UAAU,CACR,kBAAkB,CAAC,mCAAmC,CAAC,EACvD,mCAAmC,CACpC,CACF;IAqDD;;;;;OAKG;IACG,2BAA2B,CAC/B,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,sBAAsB,EAC5B,OAAO,CAAC,EAAE,yCAAyC,GAClD,OAAO,CAAC,mCAAmC,CAAC;IAS/C;;;;OAIG;IACH,qBAAqB,CACnB,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,+CAA+C,GACxD,OAAO,CAAC,yCAAyC,CAAC;CAMtD"}
@@ -0,0 +1,203 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { __awaiter } from "tslib";
import * as coreClient from "@azure/core-client";
import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
import { LroEngine } from "@azure/core-lro";
import { LroImpl } from "../lroImpl";
/** Class containing SubscriptionOperations operations. */
export class SubscriptionOperationsImpl {
/**
* Initialize a new instance of the class SubscriptionOperations class.
* @param client Reference to the service client
*/
constructor(client) {
this.client = client;
}
/**
* The operation to cancel a subscription
* @param subscriptionId Subscription Id.
* @param options The options parameters.
*/
cancel(subscriptionId, options) {
return this.client.sendOperationRequest({ subscriptionId, options }, cancelOperationSpec);
}
/**
* The operation to rename a subscription
* @param subscriptionId Subscription Id.
* @param body Subscription Name
* @param options The options parameters.
*/
rename(subscriptionId, body, options) {
return this.client.sendOperationRequest({ subscriptionId, body, options }, renameOperationSpec);
}
/**
* The operation to enable a subscription
* @param subscriptionId Subscription Id.
* @param options The options parameters.
*/
enable(subscriptionId, options) {
return this.client.sendOperationRequest({ subscriptionId, options }, enableOperationSpec);
}
/**
* Accept subscription ownership.
* @param subscriptionId Subscription Id.
* @param body The parameters required to accept subscription ownership.
* @param options The options parameters.
*/
beginAcceptOwnership(subscriptionId, body, options) {
return __awaiter(this, void 0, void 0, function* () {
const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
return this.client.sendOperationRequest(args, spec);
});
const sendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
var _a;
let currentRawResponse = undefined;
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
const callback = (rawResponse, flatResponse) => {
currentRawResponse = rawResponse;
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
};
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
const flatResponse = yield directSendOperation(updatedArgs, spec);
return {
flatResponse,
rawResponse: {
statusCode: currentRawResponse.status,
body: currentRawResponse.parsedBody,
headers: currentRawResponse.headers.toJSON()
}
};
});
const lro = new LroImpl(sendOperation, { subscriptionId, body, options }, acceptOwnershipOperationSpec);
const poller = new LroEngine(lro, {
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
});
yield poller.poll();
return poller;
});
}
/**
* Accept subscription ownership.
* @param subscriptionId Subscription Id.
* @param body The parameters required to accept subscription ownership.
* @param options The options parameters.
*/
beginAcceptOwnershipAndWait(subscriptionId, body, options) {
return __awaiter(this, void 0, void 0, function* () {
const poller = yield this.beginAcceptOwnership(subscriptionId, body, options);
return poller.pollUntilDone();
});
}
/**
* Accept subscription ownership status.
* @param subscriptionId Subscription Id.
* @param options The options parameters.
*/
acceptOwnershipStatus(subscriptionId, options) {
return this.client.sendOperationRequest({ subscriptionId, options }, acceptOwnershipStatusOperationSpec);
}
}
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const cancelOperationSpec = {
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/cancel",
httpMethod: "POST",
responses: {
200: {
bodyMapper: Mappers.CanceledSubscriptionId
},
default: {
bodyMapper: Mappers.ErrorResponseBody
}
},
queryParameters: [Parameters.apiVersion1],
urlParameters: [Parameters.$host, Parameters.subscriptionId],
headerParameters: [Parameters.accept],
serializer
};
const renameOperationSpec = {
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/rename",
httpMethod: "POST",
responses: {
200: {
bodyMapper: Mappers.RenamedSubscriptionId
},
default: {
bodyMapper: Mappers.ErrorResponseBody
}
},
requestBody: Parameters.body,
queryParameters: [Parameters.apiVersion1],
urlParameters: [Parameters.$host, Parameters.subscriptionId],
headerParameters: [Parameters.accept, Parameters.contentType],
mediaType: "json",
serializer
};
const enableOperationSpec = {
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Subscription/enable",
httpMethod: "POST",
responses: {
200: {
bodyMapper: Mappers.EnabledSubscriptionId
},
default: {
bodyMapper: Mappers.ErrorResponseBody
}
},
queryParameters: [Parameters.apiVersion1],
urlParameters: [Parameters.$host, Parameters.subscriptionId],
headerParameters: [Parameters.accept],
serializer
};
const acceptOwnershipOperationSpec = {
path: "/providers/Microsoft.Subscription/subscriptions/{subscriptionId}/acceptOwnership",
httpMethod: "POST",
responses: {
200: {
headersMapper: Mappers.SubscriptionAcceptOwnershipHeaders
},
201: {
headersMapper: Mappers.SubscriptionAcceptOwnershipHeaders
},
202: {
headersMapper: Mappers.SubscriptionAcceptOwnershipHeaders
},
204: {
headersMapper: Mappers.SubscriptionAcceptOwnershipHeaders
},
default: {
bodyMapper: Mappers.ErrorResponseBody
}
},
requestBody: Parameters.body1,
queryParameters: [Parameters.apiVersion1],
urlParameters: [Parameters.$host, Parameters.subscriptionId],
headerParameters: [Parameters.accept, Parameters.contentType],
mediaType: "json",
serializer
};
const acceptOwnershipStatusOperationSpec = {
path: "/providers/Microsoft.Subscription/subscriptions/{subscriptionId}/acceptOwnershipStatus",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.AcceptOwnershipStatusResponse
},
default: {
bodyMapper: Mappers.ErrorResponseBody
}
},
queryParameters: [Parameters.apiVersion1],
urlParameters: [Parameters.$host, Parameters.subscriptionId],
headerParameters: [Parameters.accept],
serializer
};
//# sourceMappingURL=subscriptionOperations.js.map
@@ -0,0 +1 @@
{"version":3,"file":"subscriptionOperations.js","sourceRoot":"","sources":["../../../src/operations/subscriptionOperations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAEnD,OAAO,EAAkC,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAgBrC,0DAA0D;AAC1D,MAAM,OAAO,0BAA0B;IAGrC;;;OAGG;IACH,YAAY,MAA0B;QACpC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACH,MAAM,CACJ,cAAsB,EACtB,OAA0C;QAE1C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,cAAc,EAAE,OAAO,EAAE,EAC3B,mBAAmB,CACpB,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,MAAM,CACJ,cAAsB,EACtB,IAAsB,EACtB,OAA0C;QAE1C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,cAAc,EAAE,IAAI,EAAE,OAAO,EAAE,EACjC,mBAAmB,CACpB,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,MAAM,CACJ,cAAsB,EACtB,OAA0C;QAE1C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,cAAc,EAAE,OAAO,EAAE,EAC3B,mBAAmB,CACpB,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACG,oBAAoB,CACxB,cAAsB,EACtB,IAA4B,EAC5B,OAAmD;;YAOnD,MAAM,mBAAmB,GAAG,CAC1B,IAAmC,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,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC;IAC5D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7D,SAAS,EAAE,MAAM;IACjB,UAAU;CACX,CAAC;AACF,MAAM,kCAAkC,GAA6B;IACnE,IAAI,EACF,wFAAwF;IAC1F,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,6BAA6B;SAClD;QACD,OAAO,EAAE;YACP,UAAU,EAAE,OAAO,CAAC,iBAAiB;SACtC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,cAAc,CAAC;IAC5D,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC"}
@@ -0,0 +1,43 @@
import { PagedAsyncIterableIterator } from "@azure/core-paging";
import { SubscriptionPolicy } from "../operationsInterfaces";
import { SubscriptionClient } from "../subscriptionClient";
import { GetTenantPolicyResponse, SubscriptionPolicyListPolicyForTenantOptionalParams, PutTenantPolicyRequestProperties, SubscriptionPolicyAddUpdatePolicyForTenantOptionalParams, SubscriptionPolicyAddUpdatePolicyForTenantResponse, SubscriptionPolicyGetPolicyForTenantOptionalParams, SubscriptionPolicyGetPolicyForTenantResponse } from "../models";
/** Class containing SubscriptionPolicy operations. */
export declare class SubscriptionPolicyImpl implements SubscriptionPolicy {
private readonly client;
/**
* Initialize a new instance of the class SubscriptionPolicy class.
* @param client Reference to the service client
*/
constructor(client: SubscriptionClient);
/**
* Get the subscription tenant policy for the user's tenant.
* @param options The options parameters.
*/
listPolicyForTenant(options?: SubscriptionPolicyListPolicyForTenantOptionalParams): PagedAsyncIterableIterator<GetTenantPolicyResponse>;
private listPolicyForTenantPagingPage;
private listPolicyForTenantPagingAll;
/**
* Create or Update Subscription tenant policy for user's tenant.
* @param body Put tenant policy request properties.
* @param options The options parameters.
*/
addUpdatePolicyForTenant(body: PutTenantPolicyRequestProperties, options?: SubscriptionPolicyAddUpdatePolicyForTenantOptionalParams): Promise<SubscriptionPolicyAddUpdatePolicyForTenantResponse>;
/**
* Get the subscription tenant policy for the user's tenant.
* @param options The options parameters.
*/
getPolicyForTenant(options?: SubscriptionPolicyGetPolicyForTenantOptionalParams): Promise<SubscriptionPolicyGetPolicyForTenantResponse>;
/**
* Get the subscription tenant policy for the user's tenant.
* @param options The options parameters.
*/
private _listPolicyForTenant;
/**
* ListPolicyForTenantNext
* @param nextLink The nextLink from the previous successful call to the ListPolicyForTenant method.
* @param options The options parameters.
*/
private _listPolicyForTenantNext;
}
//# sourceMappingURL=subscriptionPolicy.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"subscriptionPolicy.d.ts","sourceRoot":"","sources":["../../../src/operations/subscriptionPolicy.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,0BAA0B,EAAgB,MAAM,oBAAoB,CAAC;AAE9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAI7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EACL,uBAAuB,EAEvB,mDAAmD,EAEnD,gCAAgC,EAChC,wDAAwD,EACxD,kDAAkD,EAClD,kDAAkD,EAClD,4CAA4C,EAE7C,MAAM,WAAW,CAAC;AAGnB,sDAAsD;AACtD,qBAAa,sBAAuB,YAAW,kBAAkB;IAC/D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAE5C;;;OAGG;gBACS,MAAM,EAAE,kBAAkB;IAItC;;;OAGG;IACI,mBAAmB,CACxB,OAAO,CAAC,EAAE,mDAAmD,GAC5D,0BAA0B,CAAC,uBAAuB,CAAC;YAkBvC,6BAA6B;YAsB7B,4BAA4B;IAQ3C;;;;OAIG;IACH,wBAAwB,CACtB,IAAI,EAAE,gCAAgC,EACtC,OAAO,CAAC,EAAE,wDAAwD,GACjE,OAAO,CAAC,kDAAkD,CAAC;IAO9D;;;OAGG;IACH,kBAAkB,CAChB,OAAO,CAAC,EAAE,kDAAkD,GAC3D,OAAO,CAAC,4CAA4C,CAAC;IAOxD;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAS5B;;;;OAIG;IACH,OAAO,CAAC,wBAAwB;CASjC"}
@@ -0,0 +1,181 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
import { setContinuationToken } from "../pagingHelper";
import * as coreClient from "@azure/core-client";
import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
/// <reference lib="esnext.asynciterable" />
/** Class containing SubscriptionPolicy operations. */
export class SubscriptionPolicyImpl {
/**
* Initialize a new instance of the class SubscriptionPolicy class.
* @param client Reference to the service client
*/
constructor(client) {
this.client = client;
}
/**
* Get the subscription tenant policy for the user's tenant.
* @param options The options parameters.
*/
listPolicyForTenant(options) {
const iter = this.listPolicyForTenantPagingAll(options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: (settings) => {
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
throw new Error("maxPageSize is not supported by this operation.");
}
return this.listPolicyForTenantPagingPage(options, settings);
}
};
}
listPolicyForTenantPagingPage(options, settings) {
return __asyncGenerator(this, arguments, function* listPolicyForTenantPagingPage_1() {
let result;
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
if (!continuationToken) {
result = yield __await(this._listPolicyForTenant(options));
let page = result.value || [];
continuationToken = result.nextLink;
setContinuationToken(page, continuationToken);
yield yield __await(page);
}
while (continuationToken) {
result = yield __await(this._listPolicyForTenantNext(continuationToken, options));
continuationToken = result.nextLink;
let page = result.value || [];
setContinuationToken(page, continuationToken);
yield yield __await(page);
}
});
}
listPolicyForTenantPagingAll(options) {
return __asyncGenerator(this, arguments, function* listPolicyForTenantPagingAll_1() {
var e_1, _a;
try {
for (var _b = __asyncValues(this.listPolicyForTenantPagingPage(options)), _c; _c = yield __await(_b.next()), !_c.done;) {
const page = _c.value;
yield __await(yield* __asyncDelegator(__asyncValues(page)));
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
}
finally { if (e_1) throw e_1.error; }
}
});
}
/**
* Create or Update Subscription tenant policy for user's tenant.
* @param body Put tenant policy request properties.
* @param options The options parameters.
*/
addUpdatePolicyForTenant(body, options) {
return this.client.sendOperationRequest({ body, options }, addUpdatePolicyForTenantOperationSpec);
}
/**
* Get the subscription tenant policy for the user's tenant.
* @param options The options parameters.
*/
getPolicyForTenant(options) {
return this.client.sendOperationRequest({ options }, getPolicyForTenantOperationSpec);
}
/**
* Get the subscription tenant policy for the user's tenant.
* @param options The options parameters.
*/
_listPolicyForTenant(options) {
return this.client.sendOperationRequest({ options }, listPolicyForTenantOperationSpec);
}
/**
* ListPolicyForTenantNext
* @param nextLink The nextLink from the previous successful call to the ListPolicyForTenant method.
* @param options The options parameters.
*/
_listPolicyForTenantNext(nextLink, options) {
return this.client.sendOperationRequest({ nextLink, options }, listPolicyForTenantNextOperationSpec);
}
}
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const addUpdatePolicyForTenantOperationSpec = {
path: "/providers/Microsoft.Subscription/policies/default",
httpMethod: "PUT",
responses: {
200: {
bodyMapper: Mappers.GetTenantPolicyResponse
},
default: {
bodyMapper: Mappers.ErrorResponseBody
}
},
requestBody: Parameters.body3,
queryParameters: [Parameters.apiVersion1],
urlParameters: [Parameters.$host],
headerParameters: [Parameters.accept, Parameters.contentType],
mediaType: "json",
serializer
};
const getPolicyForTenantOperationSpec = {
path: "/providers/Microsoft.Subscription/policies/default",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.GetTenantPolicyResponse
},
default: {
bodyMapper: Mappers.ErrorResponseBody
}
},
queryParameters: [Parameters.apiVersion1],
urlParameters: [Parameters.$host],
headerParameters: [Parameters.accept],
serializer
};
const listPolicyForTenantOperationSpec = {
path: "/providers/Microsoft.Subscription/policies",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.GetTenantPolicyListResponse
},
default: {
bodyMapper: Mappers.ErrorResponseBody
}
},
queryParameters: [Parameters.apiVersion1],
urlParameters: [Parameters.$host],
headerParameters: [Parameters.accept],
serializer
};
const listPolicyForTenantNextOperationSpec = {
path: "{nextLink}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.GetTenantPolicyListResponse
},
default: {
bodyMapper: Mappers.ErrorResponseBody
}
},
queryParameters: [Parameters.apiVersion1],
urlParameters: [Parameters.$host, Parameters.nextLink],
headerParameters: [Parameters.accept],
serializer
};
//# sourceMappingURL=subscriptionPolicy.js.map
@@ -0,0 +1 @@
{"version":3,"file":"subscriptionPolicy.js","sourceRoot":"","sources":["../../../src/operations/subscriptionPolicy.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvD,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAenD,4CAA4C;AAC5C,sDAAsD;AACtD,MAAM,OAAO,sBAAsB;IAGjC;;;OAGG;IACH,YAAY,MAA0B;QACpC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;OAGG;IACI,mBAAmB,CACxB,OAA6D;QAE7D,MAAM,IAAI,GAAG,IAAI,CAAC,4BAA4B,CAAC,OAAO,CAAC,CAAC;QACxD,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;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AE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;IACtD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC"}
@@ -0,0 +1,54 @@
import { PagedAsyncIterableIterator } from "@azure/core-paging";
import { Subscriptions } from "../operationsInterfaces";
import { SubscriptionClient } from "../subscriptionClient";
import { Location, SubscriptionsListLocationsOptionalParams, Subscription, SubscriptionsListOptionalParams, SubscriptionsGetOptionalParams, SubscriptionsGetResponse } from "../models";
/** Class containing Subscriptions operations. */
export declare class SubscriptionsImpl implements Subscriptions {
private readonly client;
/**
* Initialize a new instance of the class Subscriptions class.
* @param client Reference to the service client
*/
constructor(client: SubscriptionClient);
/**
* This operation provides all the locations that are available for resource providers; however, each
* resource provider may support a subset of this list.
* @param subscriptionId The ID of the target subscription.
* @param options The options parameters.
*/
listLocations(subscriptionId: string, options?: SubscriptionsListLocationsOptionalParams): PagedAsyncIterableIterator<Location>;
private listLocationsPagingPage;
private listLocationsPagingAll;
/**
* Gets all subscriptions for a tenant.
* @param options The options parameters.
*/
list(options?: SubscriptionsListOptionalParams): PagedAsyncIterableIterator<Subscription>;
private listPagingPage;
private listPagingAll;
/**
* This operation provides all the locations that are available for resource providers; however, each
* resource provider may support a subset of this list.
* @param subscriptionId The ID of the target subscription.
* @param options The options parameters.
*/
private _listLocations;
/**
* Gets details about a specified subscription.
* @param subscriptionId The ID of the target subscription.
* @param options The options parameters.
*/
get(subscriptionId: string, options?: SubscriptionsGetOptionalParams): Promise<SubscriptionsGetResponse>;
/**
* Gets all subscriptions for a tenant.
* @param options The options parameters.
*/
private _list;
/**
* ListNext
* @param nextLink The nextLink from the previous successful call to the List method.
* @param options The options parameters.
*/
private _listNext;
}
//# sourceMappingURL=subscriptions.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"subscriptions.d.ts","sourceRoot":"","sources":["../../../src/operations/subscriptions.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,0BAA0B,EAAgB,MAAM,oBAAoB,CAAC;AAE9E,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAIxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EACL,QAAQ,EACR,wCAAwC,EAExC,YAAY,EAEZ,+BAA+B,EAE/B,8BAA8B,EAC9B,wBAAwB,EAEzB,MAAM,WAAW,CAAC;AAGnB,iDAAiD;AACjD,qBAAa,iBAAkB,YAAW,aAAa;IACrD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAE5C;;;OAGG;gBACS,MAAM,EAAE,kBAAkB;IAItC;;;;;OAKG;IACI,aAAa,CAClB,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,wCAAwC,GACjD,0BAA0B,CAAC,QAAQ,CAAC;YAkBxB,uBAAuB;YAUvB,sBAAsB;IAYrC;;;OAGG;IACI,IAAI,CACT,OAAO,CAAC,EAAE,+BAA+B,GACxC,0BAA0B,CAAC,YAAY,CAAC;YAkB5B,cAAc;YAsBd,aAAa;IAQ5B;;;;;OAKG;IACH,OAAO,CAAC,cAAc;IAUtB;;;;OAIG;IACH,GAAG,CACD,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,8BAA8B,GACvC,OAAO,CAAC,wBAAwB,CAAC;IAOpC;;;OAGG;IACH,OAAO,CAAC,KAAK;IAMb;;;;OAIG;IACH,OAAO,CAAC,SAAS;CASlB"}
@@ -0,0 +1,217 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
import { setContinuationToken } from "../pagingHelper";
import * as coreClient from "@azure/core-client";
import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
/// <reference lib="esnext.asynciterable" />
/** Class containing Subscriptions operations. */
export class SubscriptionsImpl {
/**
* Initialize a new instance of the class Subscriptions class.
* @param client Reference to the service client
*/
constructor(client) {
this.client = client;
}
/**
* This operation provides all the locations that are available for resource providers; however, each
* resource provider may support a subset of this list.
* @param subscriptionId The ID of the target subscription.
* @param options The options parameters.
*/
listLocations(subscriptionId, options) {
const iter = this.listLocationsPagingAll(subscriptionId, options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: (settings) => {
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
throw new Error("maxPageSize is not supported by this operation.");
}
return this.listLocationsPagingPage(subscriptionId, options, settings);
}
};
}
listLocationsPagingPage(subscriptionId, options, _settings) {
return __asyncGenerator(this, arguments, function* listLocationsPagingPage_1() {
let result;
result = yield __await(this._listLocations(subscriptionId, options));
yield yield __await(result.value || []);
});
}
listLocationsPagingAll(subscriptionId, options) {
return __asyncGenerator(this, arguments, function* listLocationsPagingAll_1() {
var e_1, _a;
try {
for (var _b = __asyncValues(this.listLocationsPagingPage(subscriptionId, options)), _c; _c = yield __await(_b.next()), !_c.done;) {
const page = _c.value;
yield __await(yield* __asyncDelegator(__asyncValues(page)));
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
}
finally { if (e_1) throw e_1.error; }
}
});
}
/**
* Gets all subscriptions for a tenant.
* @param options The options parameters.
*/
list(options) {
const iter = this.listPagingAll(options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: (settings) => {
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
throw new Error("maxPageSize is not supported by this operation.");
}
return this.listPagingPage(options, settings);
}
};
}
listPagingPage(options, settings) {
return __asyncGenerator(this, arguments, function* listPagingPage_1() {
let result;
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
if (!continuationToken) {
result = yield __await(this._list(options));
let page = result.value || [];
continuationToken = result.nextLink;
setContinuationToken(page, continuationToken);
yield yield __await(page);
}
while (continuationToken) {
result = yield __await(this._listNext(continuationToken, options));
continuationToken = result.nextLink;
let page = result.value || [];
setContinuationToken(page, continuationToken);
yield yield __await(page);
}
});
}
listPagingAll(options) {
return __asyncGenerator(this, arguments, function* listPagingAll_1() {
var e_2, _a;
try {
for (var _b = __asyncValues(this.listPagingPage(options)), _c; _c = yield __await(_b.next()), !_c.done;) {
const page = _c.value;
yield __await(yield* __asyncDelegator(__asyncValues(page)));
}
}
catch (e_2_1) { e_2 = { error: e_2_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
}
finally { if (e_2) throw e_2.error; }
}
});
}
/**
* This operation provides all the locations that are available for resource providers; however, each
* resource provider may support a subset of this list.
* @param subscriptionId The ID of the target subscription.
* @param options The options parameters.
*/
_listLocations(subscriptionId, options) {
return this.client.sendOperationRequest({ subscriptionId, options }, listLocationsOperationSpec);
}
/**
* Gets details about a specified subscription.
* @param subscriptionId The ID of the target subscription.
* @param options The options parameters.
*/
get(subscriptionId, options) {
return this.client.sendOperationRequest({ subscriptionId, options }, getOperationSpec);
}
/**
* Gets all subscriptions for a tenant.
* @param options The options parameters.
*/
_list(options) {
return this.client.sendOperationRequest({ options }, listOperationSpec);
}
/**
* ListNext
* @param nextLink The nextLink from the previous successful call to the List method.
* @param options The options parameters.
*/
_listNext(nextLink, options) {
return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
}
}
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const listLocationsOperationSpec = {
path: "/subscriptions/{subscriptionId}/locations",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.LocationListResult
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host, Parameters.subscriptionId],
headerParameters: [Parameters.accept],
serializer
};
const getOperationSpec = {
path: "/subscriptions/{subscriptionId}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.Subscription
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host, Parameters.subscriptionId],
headerParameters: [Parameters.accept],
serializer
};
const listOperationSpec = {
path: "/subscriptions",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.SubscriptionListResult
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host],
headerParameters: [Parameters.accept],
serializer
};
const listNextOperationSpec = {
path: "{nextLink}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.SubscriptionListResult
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host, Parameters.nextLink],
headerParameters: [Parameters.accept],
serializer
};
//# sourceMappingURL=subscriptions.js.map
@@ -0,0 +1 @@
{"version":3,"file":"subscriptions.js","sourceRoot":"","sources":["../../../src/operations/subscriptions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvD,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,mBAAmB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,sBAAsB,CAAC;AAenD,4CAA4C;AAC5C,iDAAiD;AACjD,MAAM,OAAO,iBAAiB;IAG5B;;;OAGG;IACH,YAAY,MAA0B;QACpC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,aAAa,CAClB,cAAsB,EACtB,OAAkD;QAElD,MAAM,IAAI,GAAG,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;QAClE,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW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CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EAAE,gBAAgB;IACtB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,sBAAsB;SAC3C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;IACjC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,sBAAsB;SAC3C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;IACtD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC"}
@@ -0,0 +1,32 @@
import { PagedAsyncIterableIterator } from "@azure/core-paging";
import { Tenants } from "../operationsInterfaces";
import { SubscriptionClient } from "../subscriptionClient";
import { TenantIdDescription, TenantsListOptionalParams } from "../models";
/** Class containing Tenants operations. */
export declare class TenantsImpl implements Tenants {
private readonly client;
/**
* Initialize a new instance of the class Tenants class.
* @param client Reference to the service client
*/
constructor(client: SubscriptionClient);
/**
* Gets the tenants for your account.
* @param options The options parameters.
*/
list(options?: TenantsListOptionalParams): PagedAsyncIterableIterator<TenantIdDescription>;
private listPagingPage;
private listPagingAll;
/**
* Gets the tenants for your account.
* @param options The options parameters.
*/
private _list;
/**
* ListNext
* @param nextLink The nextLink from the previous successful call to the List method.
* @param options The options parameters.
*/
private _listNext;
}
//# sourceMappingURL=tenants.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"tenants.d.ts","sourceRoot":"","sources":["../../../src/operations/tenants.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,0BAA0B,EAAgB,MAAM,oBAAoB,CAAC;AAE9E,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAIlD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EACL,mBAAmB,EAEnB,yBAAyB,EAG1B,MAAM,WAAW,CAAC;AAGnB,2CAA2C;AAC3C,qBAAa,WAAY,YAAW,OAAO;IACzC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAE5C;;;OAGG;gBACS,MAAM,EAAE,kBAAkB;IAItC;;;OAGG;IACI,IAAI,CACT,OAAO,CAAC,EAAE,yBAAyB,GAClC,0BAA0B,CAAC,mBAAmB,CAAC;YAkBnC,cAAc;YAsBd,aAAa;IAQ5B;;;OAGG;IACH,OAAO,CAAC,KAAK;IAMb;;;;OAIG;IACH,OAAO,CAAC,SAAS;CASlB"}
@@ -0,0 +1,126 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
import { setContinuationToken } from "../pagingHelper";
import * as coreClient from "@azure/core-client";
import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
/// <reference lib="esnext.asynciterable" />
/** Class containing Tenants operations. */
export class TenantsImpl {
/**
* Initialize a new instance of the class Tenants class.
* @param client Reference to the service client
*/
constructor(client) {
this.client = client;
}
/**
* Gets the tenants for your account.
* @param options The options parameters.
*/
list(options) {
const iter = this.listPagingAll(options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: (settings) => {
if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
throw new Error("maxPageSize is not supported by this operation.");
}
return this.listPagingPage(options, settings);
}
};
}
listPagingPage(options, settings) {
return __asyncGenerator(this, arguments, function* listPagingPage_1() {
let result;
let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
if (!continuationToken) {
result = yield __await(this._list(options));
let page = result.value || [];
continuationToken = result.nextLink;
setContinuationToken(page, continuationToken);
yield yield __await(page);
}
while (continuationToken) {
result = yield __await(this._listNext(continuationToken, options));
continuationToken = result.nextLink;
let page = result.value || [];
setContinuationToken(page, continuationToken);
yield yield __await(page);
}
});
}
listPagingAll(options) {
return __asyncGenerator(this, arguments, function* listPagingAll_1() {
var e_1, _a;
try {
for (var _b = __asyncValues(this.listPagingPage(options)), _c; _c = yield __await(_b.next()), !_c.done;) {
const page = _c.value;
yield __await(yield* __asyncDelegator(__asyncValues(page)));
}
}
catch (e_1_1) { e_1 = { error: e_1_1 }; }
finally {
try {
if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
}
finally { if (e_1) throw e_1.error; }
}
});
}
/**
* Gets the tenants for your account.
* @param options The options parameters.
*/
_list(options) {
return this.client.sendOperationRequest({ options }, listOperationSpec);
}
/**
* ListNext
* @param nextLink The nextLink from the previous successful call to the List method.
* @param options The options parameters.
*/
_listNext(nextLink, options) {
return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec);
}
}
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const listOperationSpec = {
path: "/tenants",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.TenantListResult
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host],
headerParameters: [Parameters.accept],
serializer
};
const listNextOperationSpec = {
path: "{nextLink}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.TenantListResult
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host, Parameters.nextLink],
headerParameters: [Parameters.accept],
serializer
};
//# sourceMappingURL=tenants.js.map
@@ -0,0 +1 @@
{"version":3,"file":"tenants.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AAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gBAAgB;SACrC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC;IACjC,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,qBAAqB,GAA6B;IACtD,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gBAAgB;SACrC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,QAAQ,CAAC;IACtD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC"}
@@ -0,0 +1,45 @@
import { PollerLike, PollOperationState } from "@azure/core-lro";
import { PutAliasRequest, AliasCreateOptionalParams, AliasCreateResponse, AliasGetOptionalParams, AliasGetResponse, AliasDeleteOptionalParams, AliasListOptionalParams, AliasListResponse } from "../models";
/** Interface representing a Alias. */
export interface Alias {
/**
* Create Alias Subscription.
* @param aliasName AliasName is the name for the subscription creation request. Note that this is not
* the same as subscription name and this doesnt have any other lifecycle need beyond the request for
* subscription creation.
* @param body The parameters required to create a new subscription.
* @param options The options parameters.
*/
beginCreate(aliasName: string, body: PutAliasRequest, options?: AliasCreateOptionalParams): Promise<PollerLike<PollOperationState<AliasCreateResponse>, AliasCreateResponse>>;
/**
* Create Alias Subscription.
* @param aliasName AliasName is the name for the subscription creation request. Note that this is not
* the same as subscription name and this doesnt have any other lifecycle need beyond the request for
* subscription creation.
* @param body The parameters required to create a new subscription.
* @param options The options parameters.
*/
beginCreateAndWait(aliasName: string, body: PutAliasRequest, options?: AliasCreateOptionalParams): Promise<AliasCreateResponse>;
/**
* Get Alias Subscription.
* @param aliasName AliasName is the name for the subscription creation request. Note that this is not
* the same as subscription name and this doesnt have any other lifecycle need beyond the request for
* subscription creation.
* @param options The options parameters.
*/
get(aliasName: string, options?: AliasGetOptionalParams): Promise<AliasGetResponse>;
/**
* Delete Alias.
* @param aliasName AliasName is the name for the subscription creation request. Note that this is not
* the same as subscription name and this doesnt have any other lifecycle need beyond the request for
* subscription creation.
* @param options The options parameters.
*/
delete(aliasName: string, options?: AliasDeleteOptionalParams): Promise<void>;
/**
* List Alias Subscription.
* @param options The options parameters.
*/
list(options?: AliasListOptionalParams): Promise<AliasListResponse>;
}
//# sourceMappingURL=alias.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"alias.d.ts","sourceRoot":"","sources":["../../../src/operationsInterfaces/alias.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EACL,eAAe,EACf,yBAAyB,EACzB,mBAAmB,EACnB,sBAAsB,EACtB,gBAAgB,EAChB,yBAAyB,EACzB,uBAAuB,EACvB,iBAAiB,EAClB,MAAM,WAAW,CAAC;AAEnB,sCAAsC;AACtC,MAAM,WAAW,KAAK;IACpB;;;;;;;OAOG;IACH,WAAW,CACT,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,eAAe,EACrB,OAAO,CAAC,EAAE,yBAAyB,GAClC,OAAO,CACR,UAAU,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,EAAE,mBAAmB,CAAC,CACzE,CAAC;IACF;;;;;;;OAOG;IACH,kBAAkB,CAChB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,eAAe,EACrB,OAAO,CAAC,EAAE,yBAAyB,GAClC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAChC;;;;;;OAMG;IACH,GAAG,CACD,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,sBAAsB,GAC/B,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC7B;;;;;;OAMG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9E;;;OAGG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;CACrE"}
@@ -0,0 +1,9 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
export {};
//# sourceMappingURL=alias.js.map
@@ -0,0 +1 @@
{"version":3,"file":"alias.js","sourceRoot":"","sources":["../../../src/operationsInterfaces/alias.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,11 @@
import { BillingAccountGetPolicyOptionalParams, BillingAccountGetPolicyResponse } from "../models";
/** Interface representing a BillingAccount. */
export interface BillingAccount {
/**
* Get Billing Account Policy.
* @param billingAccountId Billing Account Id.
* @param options The options parameters.
*/
getPolicy(billingAccountId: string, options?: BillingAccountGetPolicyOptionalParams): Promise<BillingAccountGetPolicyResponse>;
}
//# sourceMappingURL=billingAccount.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"billingAccount.d.ts","sourceRoot":"","sources":["../../../src/operationsInterfaces/billingAccount.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,qCAAqC,EACrC,+BAA+B,EAChC,MAAM,WAAW,CAAC;AAEnB,+CAA+C;AAC/C,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,SAAS,CACP,gBAAgB,EAAE,MAAM,EACxB,OAAO,CAAC,EAAE,qCAAqC,GAC9C,OAAO,CAAC,+BAA+B,CAAC,CAAC;CAC7C"}
@@ -0,0 +1,9 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
export {};
//# sourceMappingURL=billingAccount.js.map
@@ -0,0 +1 @@
{"version":3,"file":"billingAccount.js","sourceRoot":"","sources":["../../../src/operationsInterfaces/billingAccount.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,8 @@
export * from "./subscriptions";
export * from "./tenants";
export * from "./subscriptionOperations";
export * from "./operations";
export * from "./alias";
export * from "./subscriptionPolicy";
export * from "./billingAccount";
//# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/operationsInterfaces/index.ts"],"names":[],"mappings":"AAQA,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,0BAA0B,CAAC;AACzC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,15 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
export * from "./subscriptions";
export * from "./tenants";
export * from "./subscriptionOperations";
export * from "./operations";
export * from "./alias";
export * from "./subscriptionPolicy";
export * from "./billingAccount";
//# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/operationsInterfaces/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,0BAA0B,CAAC;AACzC,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC"}
@@ -0,0 +1,11 @@
import { PagedAsyncIterableIterator } from "@azure/core-paging";
import { Operation, OperationsListOptionalParams } from "../models";
/** Interface representing a Operations. */
export interface Operations {
/**
* Lists all of the available Microsoft.Subscription API operations.
* @param options The options parameters.
*/
list(options?: OperationsListOptionalParams): PagedAsyncIterableIterator<Operation>;
}
//# sourceMappingURL=operations.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../../src/operationsInterfaces/operations.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,4BAA4B,EAAE,MAAM,WAAW,CAAC;AAGpE,2CAA2C;AAC3C,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,IAAI,CACF,OAAO,CAAC,EAAE,4BAA4B,GACrC,0BAA0B,CAAC,SAAS,CAAC,CAAC;CAC1C"}
@@ -0,0 +1,9 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
export {};
//# sourceMappingURL=operations.js.map
@@ -0,0 +1 @@
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../../src/operationsInterfaces/operations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,45 @@
import { PollerLike, PollOperationState } from "@azure/core-lro";
import { SubscriptionCancelOptionalParams, SubscriptionCancelResponse, SubscriptionName, SubscriptionRenameOptionalParams, SubscriptionRenameResponse, SubscriptionEnableOptionalParams, SubscriptionEnableResponse, AcceptOwnershipRequest, SubscriptionAcceptOwnershipOptionalParams, SubscriptionAcceptOwnershipResponse, SubscriptionAcceptOwnershipStatusOptionalParams, SubscriptionAcceptOwnershipStatusResponse } from "../models";
/** Interface representing a SubscriptionOperations. */
export interface SubscriptionOperations {
/**
* The operation to cancel a subscription
* @param subscriptionId Subscription Id.
* @param options The options parameters.
*/
cancel(subscriptionId: string, options?: SubscriptionCancelOptionalParams): Promise<SubscriptionCancelResponse>;
/**
* The operation to rename a subscription
* @param subscriptionId Subscription Id.
* @param body Subscription Name
* @param options The options parameters.
*/
rename(subscriptionId: string, body: SubscriptionName, options?: SubscriptionRenameOptionalParams): Promise<SubscriptionRenameResponse>;
/**
* The operation to enable a subscription
* @param subscriptionId Subscription Id.
* @param options The options parameters.
*/
enable(subscriptionId: string, options?: SubscriptionEnableOptionalParams): Promise<SubscriptionEnableResponse>;
/**
* Accept subscription ownership.
* @param subscriptionId Subscription Id.
* @param body The parameters required to accept subscription ownership.
* @param options The options parameters.
*/
beginAcceptOwnership(subscriptionId: string, body: AcceptOwnershipRequest, options?: SubscriptionAcceptOwnershipOptionalParams): Promise<PollerLike<PollOperationState<SubscriptionAcceptOwnershipResponse>, SubscriptionAcceptOwnershipResponse>>;
/**
* Accept subscription ownership.
* @param subscriptionId Subscription Id.
* @param body The parameters required to accept subscription ownership.
* @param options The options parameters.
*/
beginAcceptOwnershipAndWait(subscriptionId: string, body: AcceptOwnershipRequest, options?: SubscriptionAcceptOwnershipOptionalParams): Promise<SubscriptionAcceptOwnershipResponse>;
/**
* Accept subscription ownership status.
* @param subscriptionId Subscription Id.
* @param options The options parameters.
*/
acceptOwnershipStatus(subscriptionId: string, options?: SubscriptionAcceptOwnershipStatusOptionalParams): Promise<SubscriptionAcceptOwnershipStatusResponse>;
}
//# sourceMappingURL=subscriptionOperations.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"subscriptionOperations.d.ts","sourceRoot":"","sources":["../../../src/operationsInterfaces/subscriptionOperations.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EACL,gCAAgC,EAChC,0BAA0B,EAC1B,gBAAgB,EAChB,gCAAgC,EAChC,0BAA0B,EAC1B,gCAAgC,EAChC,0BAA0B,EAC1B,sBAAsB,EACtB,yCAAyC,EACzC,mCAAmC,EACnC,+CAA+C,EAC/C,yCAAyC,EAC1C,MAAM,WAAW,CAAC;AAEnB,uDAAuD;AACvD,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,MAAM,CACJ,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,gCAAgC,GACzC,OAAO,CAAC,0BAA0B,CAAC,CAAC;IACvC;;;;;OAKG;IACH,MAAM,CACJ,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,gBAAgB,EACtB,OAAO,CAAC,EAAE,gCAAgC,GACzC,OAAO,CAAC,0BAA0B,CAAC,CAAC;IACvC;;;;OAIG;IACH,MAAM,CACJ,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,gCAAgC,GACzC,OAAO,CAAC,0BAA0B,CAAC,CAAC;IACvC;;;;;OAKG;IACH,oBAAoB,CAClB,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,sBAAsB,EAC5B,OAAO,CAAC,EAAE,yCAAyC,GAClD,OAAO,CACR,UAAU,CACR,kBAAkB,CAAC,mCAAmC,CAAC,EACvD,mCAAmC,CACpC,CACF,CAAC;IACF;;;;;OAKG;IACH,2BAA2B,CACzB,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,sBAAsB,EAC5B,OAAO,CAAC,EAAE,yCAAyC,GAClD,OAAO,CAAC,mCAAmC,CAAC,CAAC;IAChD;;;;OAIG;IACH,qBAAqB,CACnB,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,+CAA+C,GACxD,OAAO,CAAC,yCAAyC,CAAC,CAAC;CACvD"}
@@ -0,0 +1,9 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
export {};
//# sourceMappingURL=subscriptionOperations.js.map
@@ -0,0 +1 @@
{"version":3,"file":"subscriptionOperations.js","sourceRoot":"","sources":["../../../src/operationsInterfaces/subscriptionOperations.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,22 @@
import { PagedAsyncIterableIterator } from "@azure/core-paging";
import { GetTenantPolicyResponse, SubscriptionPolicyListPolicyForTenantOptionalParams, PutTenantPolicyRequestProperties, SubscriptionPolicyAddUpdatePolicyForTenantOptionalParams, SubscriptionPolicyAddUpdatePolicyForTenantResponse, SubscriptionPolicyGetPolicyForTenantOptionalParams, SubscriptionPolicyGetPolicyForTenantResponse } from "../models";
/** Interface representing a SubscriptionPolicy. */
export interface SubscriptionPolicy {
/**
* Get the subscription tenant policy for the user's tenant.
* @param options The options parameters.
*/
listPolicyForTenant(options?: SubscriptionPolicyListPolicyForTenantOptionalParams): PagedAsyncIterableIterator<GetTenantPolicyResponse>;
/**
* Create or Update Subscription tenant policy for user's tenant.
* @param body Put tenant policy request properties.
* @param options The options parameters.
*/
addUpdatePolicyForTenant(body: PutTenantPolicyRequestProperties, options?: SubscriptionPolicyAddUpdatePolicyForTenantOptionalParams): Promise<SubscriptionPolicyAddUpdatePolicyForTenantResponse>;
/**
* Get the subscription tenant policy for the user's tenant.
* @param options The options parameters.
*/
getPolicyForTenant(options?: SubscriptionPolicyGetPolicyForTenantOptionalParams): Promise<SubscriptionPolicyGetPolicyForTenantResponse>;
}
//# sourceMappingURL=subscriptionPolicy.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"subscriptionPolicy.d.ts","sourceRoot":"","sources":["../../../src/operationsInterfaces/subscriptionPolicy.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EACL,uBAAuB,EACvB,mDAAmD,EACnD,gCAAgC,EAChC,wDAAwD,EACxD,kDAAkD,EAClD,kDAAkD,EAClD,4CAA4C,EAC7C,MAAM,WAAW,CAAC;AAGnB,mDAAmD;AACnD,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,mBAAmB,CACjB,OAAO,CAAC,EAAE,mDAAmD,GAC5D,0BAA0B,CAAC,uBAAuB,CAAC,CAAC;IACvD;;;;OAIG;IACH,wBAAwB,CACtB,IAAI,EAAE,gCAAgC,EACtC,OAAO,CAAC,EAAE,wDAAwD,GACjE,OAAO,CAAC,kDAAkD,CAAC,CAAC;IAC/D;;;OAGG;IACH,kBAAkB,CAChB,OAAO,CAAC,EAAE,kDAAkD,GAC3D,OAAO,CAAC,4CAA4C,CAAC,CAAC;CAC1D"}
@@ -0,0 +1,9 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
export {};
//# sourceMappingURL=subscriptionPolicy.js.map
@@ -0,0 +1 @@
{"version":3,"file":"subscriptionPolicy.js","sourceRoot":"","sources":["../../../src/operationsInterfaces/subscriptionPolicy.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,24 @@
import { PagedAsyncIterableIterator } from "@azure/core-paging";
import { Location, SubscriptionsListLocationsOptionalParams, Subscription, SubscriptionsListOptionalParams, SubscriptionsGetOptionalParams, SubscriptionsGetResponse } from "../models";
/** Interface representing a Subscriptions. */
export interface Subscriptions {
/**
* This operation provides all the locations that are available for resource providers; however, each
* resource provider may support a subset of this list.
* @param subscriptionId The ID of the target subscription.
* @param options The options parameters.
*/
listLocations(subscriptionId: string, options?: SubscriptionsListLocationsOptionalParams): PagedAsyncIterableIterator<Location>;
/**
* Gets all subscriptions for a tenant.
* @param options The options parameters.
*/
list(options?: SubscriptionsListOptionalParams): PagedAsyncIterableIterator<Subscription>;
/**
* Gets details about a specified subscription.
* @param subscriptionId The ID of the target subscription.
* @param options The options parameters.
*/
get(subscriptionId: string, options?: SubscriptionsGetOptionalParams): Promise<SubscriptionsGetResponse>;
}
//# sourceMappingURL=subscriptions.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"subscriptions.d.ts","sourceRoot":"","sources":["../../../src/operationsInterfaces/subscriptions.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EACL,QAAQ,EACR,wCAAwC,EACxC,YAAY,EACZ,+BAA+B,EAC/B,8BAA8B,EAC9B,wBAAwB,EACzB,MAAM,WAAW,CAAC;AAGnB,8CAA8C;AAC9C,MAAM,WAAW,aAAa;IAC5B;;;;;OAKG;IACH,aAAa,CACX,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,wCAAwC,GACjD,0BAA0B,CAAC,QAAQ,CAAC,CAAC;IACxC;;;OAGG;IACH,IAAI,CACF,OAAO,CAAC,EAAE,+BAA+B,GACxC,0BAA0B,CAAC,YAAY,CAAC,CAAC;IAC5C;;;;OAIG;IACH,GAAG,CACD,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,8BAA8B,GACvC,OAAO,CAAC,wBAAwB,CAAC,CAAC;CACtC"}
@@ -0,0 +1,9 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
export {};
//# sourceMappingURL=subscriptions.js.map
@@ -0,0 +1 @@
{"version":3,"file":"subscriptions.js","sourceRoot":"","sources":["../../../src/operationsInterfaces/subscriptions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,11 @@
import { PagedAsyncIterableIterator } from "@azure/core-paging";
import { TenantIdDescription, TenantsListOptionalParams } from "../models";
/** Interface representing a Tenants. */
export interface Tenants {
/**
* Gets the tenants for your account.
* @param options The options parameters.
*/
list(options?: TenantsListOptionalParams): PagedAsyncIterableIterator<TenantIdDescription>;
}
//# sourceMappingURL=tenants.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"tenants.d.ts","sourceRoot":"","sources":["../../../src/operationsInterfaces/tenants.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAG3E,wCAAwC;AACxC,MAAM,WAAW,OAAO;IACtB;;;OAGG;IACH,IAAI,CACF,OAAO,CAAC,EAAE,yBAAyB,GAClC,0BAA0B,CAAC,mBAAmB,CAAC,CAAC;CACpD"}
@@ -0,0 +1,9 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
export {};
//# sourceMappingURL=tenants.js.map
@@ -0,0 +1 @@
{"version":3,"file":"tenants.js","sourceRoot":"","sources":["../../../src/operationsInterfaces/tenants.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
+13
View File
@@ -0,0 +1,13 @@
export interface PageInfo {
continuationToken?: string;
}
/**
* Given a result page from a pageable operation, returns a
* continuation token that can be used to begin paging from
* that point later.
* @param page A result object from calling .byPage() on a paged operation.
* @returns The continuation token that can be passed into byPage().
*/
export declare function getContinuationToken(page: unknown): string | undefined;
export declare function setContinuationToken(page: unknown, continuationToken: string | undefined): void;
//# sourceMappingURL=pagingHelper.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"pagingHelper.d.ts","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,QAAQ;IACvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAID;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAKtE;AAED,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,OAAO,EACb,iBAAiB,EAAE,MAAM,GAAG,SAAS,GACpC,IAAI,CAON"}
+32
View File
@@ -0,0 +1,32 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
const pageMap = new WeakMap();
/**
* Given a result page from a pageable operation, returns a
* continuation token that can be used to begin paging from
* that point later.
* @param page A result object from calling .byPage() on a paged operation.
* @returns The continuation token that can be passed into byPage().
*/
export function getContinuationToken(page) {
var _a;
if (typeof page !== "object" || page === null) {
return undefined;
}
return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
}
export function setContinuationToken(page, continuationToken) {
var _a;
if (typeof page !== "object" || page === null || !continuationToken) {
return;
}
const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
pageInfo.continuationToken = continuationToken;
pageMap.set(page, pageInfo);
}
//# sourceMappingURL=pagingHelper.js.map
@@ -0,0 +1 @@
{"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAa;;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE;QAC7C,OAAO,SAAS,CAAC;KAClB;IACD,OAAO,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,0CAAE,iBAAiB,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,IAAa,EACb,iBAAqC;;IAErC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,iBAAiB,EAAE;QACnE,OAAO;KACR;IACD,MAAM,QAAQ,GAAG,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,mCAAI,EAAE,CAAC;IACzC,QAAQ,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC9B,CAAC"}
@@ -0,0 +1,21 @@
import * as coreClient from "@azure/core-client";
import * as coreAuth from "@azure/core-auth";
import { Subscriptions, Tenants, SubscriptionOperations, Operations, Alias, SubscriptionPolicy, BillingAccount } from "./operationsInterfaces";
import { SubscriptionClientOptionalParams } from "./models";
export declare class SubscriptionClient extends coreClient.ServiceClient {
$host: string;
/**
* Initializes a new instance of the SubscriptionClient class.
* @param credentials Subscription credentials which uniquely identify client subscription.
* @param options The parameter options
*/
constructor(credentials: coreAuth.TokenCredential, options?: SubscriptionClientOptionalParams);
subscriptions: Subscriptions;
tenants: Tenants;
subscriptionOperations: SubscriptionOperations;
operations: Operations;
alias: Alias;
subscriptionPolicy: SubscriptionPolicy;
billingAccount: BillingAccount;
}
//# sourceMappingURL=subscriptionClient.d.ts.map
@@ -0,0 +1 @@
{"version":3,"file":"subscriptionClient.d.ts","sourceRoot":"","sources":["../../src/subscriptionClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAEjD,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAU7C,OAAO,EACL,aAAa,EACb,OAAO,EACP,sBAAsB,EACtB,UAAU,EACV,KAAK,EACL,kBAAkB,EAClB,cAAc,EACf,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,gCAAgC,EAAE,MAAM,UAAU,CAAC;AAE5D,qBAAa,kBAAmB,SAAQ,UAAU,CAAC,aAAa;IAC9D,KAAK,EAAE,MAAM,CAAC;IAEd;;;;OAIG;gBAED,WAAW,EAAE,QAAQ,CAAC,eAAe,EACrC,OAAO,CAAC,EAAE,gCAAgC;IA2E5C,aAAa,EAAE,aAAa,CAAC;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,sBAAsB,EAAE,sBAAsB,CAAC;IAC/C,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,KAAK,CAAC;IACb,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,cAAc,EAAE,cAAc,CAAC;CAChC"}
@@ -0,0 +1,70 @@
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT License.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/
import * as coreClient from "@azure/core-client";
import * as coreRestPipeline from "@azure/core-rest-pipeline";
import { SubscriptionsImpl, TenantsImpl, SubscriptionOperationsImpl, OperationsImpl, AliasImpl, SubscriptionPolicyImpl, BillingAccountImpl } from "./operations";
export class SubscriptionClient extends coreClient.ServiceClient {
/**
* Initializes a new instance of the SubscriptionClient class.
* @param credentials Subscription credentials which uniquely identify client subscription.
* @param options The parameter options
*/
constructor(credentials, options) {
var _a, _b, _c;
if (credentials === undefined) {
throw new Error("'credentials' cannot be null");
}
// Initializing default values for options
if (!options) {
options = {};
}
const defaults = {
requestContentType: "application/json; charset=utf-8",
credential: credentials
};
const packageDetails = `azsdk-js-arm-subscriptions/5.1.0`;
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
: `${packageDetails}`;
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
userAgentPrefix
}, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
super(optionsWithDefaults);
let bearerTokenAuthenticationPolicyFound = false;
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
const pipelinePolicies = options.pipeline.getOrderedPolicies();
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
coreRestPipeline.bearerTokenAuthenticationPolicyName);
}
if (!options ||
!options.pipeline ||
options.pipeline.getOrderedPolicies().length == 0 ||
!bearerTokenAuthenticationPolicyFound) {
this.pipeline.removePolicy({
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
});
this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
credential: credentials,
scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
challengeCallbacks: {
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
}
}));
}
// Assigning values to Constant parameters
this.$host = options.$host || "https://management.azure.com";
this.subscriptions = new SubscriptionsImpl(this);
this.tenants = new TenantsImpl(this);
this.subscriptionOperations = new SubscriptionOperationsImpl(this);
this.operations = new OperationsImpl(this);
this.alias = new AliasImpl(this);
this.subscriptionPolicy = new SubscriptionPolicyImpl(this);
this.billingAccount = new BillingAccountImpl(this);
}
}
//# sourceMappingURL=subscriptionClient.js.map
@@ -0,0 +1 @@
{"version":3,"file":"subscriptionClient.js","sourceRoot":"","sources":["../../src/subscriptionClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAE9D,OAAO,EACL,iBAAiB,EACjB,WAAW,EACX,0BAA0B,EAC1B,cAAc,EACd,SAAS,EACT,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,cAAc,CAAC;AAYtB,MAAM,OAAO,kBAAmB,SAAQ,UAAU,CAAC,aAAa;IAG9D;;;;OAIG;IACH,YACE,WAAqC,EACrC,OAA0C;;QAE1C,IAAI,WAAW,KAAK,SAAS,EAAE;YAC7B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;SACjD;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,EAAE,CAAC;SACd;QACD,MAAM,QAAQ,GAAqC;YACjD,kBAAkB,EAAE,iCAAiC;YACrD,UAAU,EAAE,WAAW;SACxB,CAAC;QAEF,MAAM,cAAc,GAAG,kCAAkC,CAAC;QAC1D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GA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