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
+12
View File
@@ -0,0 +1,12 @@
/*
* 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 * from "./models";
export { ResourceManagementClient } from "./resourceManagementClient";
export * from "./operationsInterfaces";
+34
View File
@@ -0,0 +1,34 @@
/*
* 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 { LongRunningOperation, LroResponse } from "@azure/core-lro";
export class LroImpl<T> implements LongRunningOperation<T> {
constructor(
private sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>,
private args: Record<string, unknown>,
private spec: {
readonly requestBody?: unknown;
readonly path?: string;
readonly httpMethod: string;
} & Record<string, any>,
public requestPath: string = spec.path!,
public requestMethod: string = spec.httpMethod
) {}
public async sendInitialRequest(): Promise<LroResponse<T>> {
return this.sendOperationFn(this.args, this.spec);
}
public async sendPollRequest(path: string): Promise<LroResponse<T>> {
const { requestBody, ...restSpec } = this.spec;
return this.sendOperationFn(this.args, {
...restSpec,
path,
httpMethod: "GET"
});
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+402
View File
@@ -0,0 +1,402 @@
/*
* 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 {
OperationParameter,
OperationURLParameter,
OperationQueryParameter
} from "@azure/core-client";
import {
Deployment as DeploymentMapper,
ScopedDeployment as ScopedDeploymentMapper,
ScopedDeploymentWhatIf as ScopedDeploymentWhatIfMapper,
DeploymentWhatIf as DeploymentWhatIfMapper,
ProviderRegistrationRequest as ProviderRegistrationRequestMapper,
ResourcesMoveInfo as ResourcesMoveInfoMapper,
GenericResource as GenericResourceMapper,
ResourceGroup as ResourceGroupMapper,
ResourceGroupPatchable as ResourceGroupPatchableMapper,
ExportTemplateRequest as ExportTemplateRequestMapper,
TagsResource as TagsResourceMapper,
TagsPatchResource as TagsPatchResourceMapper
} from "../models/mappers";
export const accept: OperationParameter = {
parameterPath: "accept",
mapper: {
defaultValue: "application/json",
isConstant: true,
serializedName: "Accept",
type: {
name: "String"
}
}
};
export const $host: OperationURLParameter = {
parameterPath: "$host",
mapper: {
serializedName: "$host",
required: true,
type: {
name: "String"
}
},
skipEncoding: true
};
export const apiVersion: OperationQueryParameter = {
parameterPath: "apiVersion",
mapper: {
defaultValue: "2021-04-01",
isConstant: true,
serializedName: "api-version",
type: {
name: "String"
}
}
};
export const nextLink: OperationURLParameter = {
parameterPath: "nextLink",
mapper: {
serializedName: "nextLink",
required: true,
type: {
name: "String"
}
},
skipEncoding: true
};
export const scope: OperationURLParameter = {
parameterPath: "scope",
mapper: {
serializedName: "scope",
required: true,
type: {
name: "String"
}
},
skipEncoding: true
};
export const deploymentName: OperationURLParameter = {
parameterPath: "deploymentName",
mapper: {
constraints: {
Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"),
MaxLength: 64,
MinLength: 1
},
serializedName: "deploymentName",
required: true,
type: {
name: "String"
}
}
};
export const contentType: OperationParameter = {
parameterPath: ["options", "contentType"],
mapper: {
defaultValue: "application/json",
isConstant: true,
serializedName: "Content-Type",
type: {
name: "String"
}
}
};
export const parameters: OperationParameter = {
parameterPath: "parameters",
mapper: DeploymentMapper
};
export const filter: OperationQueryParameter = {
parameterPath: ["options", "filter"],
mapper: {
serializedName: "$filter",
type: {
name: "String"
}
}
};
export const top: OperationQueryParameter = {
parameterPath: ["options", "top"],
mapper: {
serializedName: "$top",
type: {
name: "Number"
}
}
};
export const parameters1: OperationParameter = {
parameterPath: "parameters",
mapper: ScopedDeploymentMapper
};
export const parameters2: OperationParameter = {
parameterPath: "parameters",
mapper: ScopedDeploymentWhatIfMapper
};
export const groupId: OperationURLParameter = {
parameterPath: "groupId",
mapper: {
constraints: {
MaxLength: 90,
MinLength: 1
},
serializedName: "groupId",
required: true,
type: {
name: "String"
}
}
};
export const subscriptionId: OperationURLParameter = {
parameterPath: "subscriptionId",
mapper: {
serializedName: "subscriptionId",
required: true,
type: {
name: "String"
}
}
};
export const parameters3: OperationParameter = {
parameterPath: "parameters",
mapper: DeploymentWhatIfMapper
};
export const resourceGroupName: OperationURLParameter = {
parameterPath: "resourceGroupName",
mapper: {
constraints: {
Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"),
MaxLength: 90,
MinLength: 1
},
serializedName: "resourceGroupName",
required: true,
type: {
name: "String"
}
}
};
export const template: OperationParameter = {
parameterPath: "template",
mapper: {
serializedName: "template",
required: true,
type: {
name: "Dictionary",
value: { type: { name: "any" } }
}
}
};
export const resourceProviderNamespace: OperationURLParameter = {
parameterPath: "resourceProviderNamespace",
mapper: {
serializedName: "resourceProviderNamespace",
required: true,
type: {
name: "String"
}
}
};
export const properties: OperationParameter = {
parameterPath: ["options", "properties"],
mapper: ProviderRegistrationRequestMapper
};
export const expand: OperationQueryParameter = {
parameterPath: ["options", "expand"],
mapper: {
serializedName: "$expand",
type: {
name: "String"
}
}
};
export const parameters4: OperationParameter = {
parameterPath: "parameters",
mapper: ResourcesMoveInfoMapper
};
export const sourceResourceGroupName: OperationURLParameter = {
parameterPath: "sourceResourceGroupName",
mapper: {
constraints: {
Pattern: new RegExp("^[-\\w\\._\\(\\)]+$"),
MaxLength: 90,
MinLength: 1
},
serializedName: "sourceResourceGroupName",
required: true,
type: {
name: "String"
}
}
};
export const parentResourcePath: OperationURLParameter = {
parameterPath: "parentResourcePath",
mapper: {
serializedName: "parentResourcePath",
required: true,
type: {
name: "String"
}
},
skipEncoding: true
};
export const resourceType: OperationURLParameter = {
parameterPath: "resourceType",
mapper: {
serializedName: "resourceType",
required: true,
type: {
name: "String"
}
},
skipEncoding: true
};
export const resourceName: OperationURLParameter = {
parameterPath: "resourceName",
mapper: {
serializedName: "resourceName",
required: true,
type: {
name: "String"
}
}
};
export const apiVersion1: OperationQueryParameter = {
parameterPath: "apiVersion",
mapper: {
serializedName: "api-version",
required: true,
type: {
name: "String"
}
}
};
export const parameters5: OperationParameter = {
parameterPath: "parameters",
mapper: GenericResourceMapper
};
export const resourceId: OperationURLParameter = {
parameterPath: "resourceId",
mapper: {
serializedName: "resourceId",
required: true,
type: {
name: "String"
}
},
skipEncoding: true
};
export const parameters6: OperationParameter = {
parameterPath: "parameters",
mapper: ResourceGroupMapper
};
export const forceDeletionTypes: OperationQueryParameter = {
parameterPath: ["options", "forceDeletionTypes"],
mapper: {
serializedName: "forceDeletionTypes",
type: {
name: "String"
}
}
};
export const parameters7: OperationParameter = {
parameterPath: "parameters",
mapper: ResourceGroupPatchableMapper
};
export const parameters8: OperationParameter = {
parameterPath: "parameters",
mapper: ExportTemplateRequestMapper
};
export const resourceGroupName1: OperationURLParameter = {
parameterPath: "resourceGroupName",
mapper: {
constraints: {
MaxLength: 90,
MinLength: 1
},
serializedName: "resourceGroupName",
required: true,
type: {
name: "String"
}
}
};
export const tagName: OperationURLParameter = {
parameterPath: "tagName",
mapper: {
serializedName: "tagName",
required: true,
type: {
name: "String"
}
}
};
export const tagValue: OperationURLParameter = {
parameterPath: "tagValue",
mapper: {
serializedName: "tagValue",
required: true,
type: {
name: "String"
}
}
};
export const parameters9: OperationParameter = {
parameterPath: "parameters",
mapper: TagsResourceMapper
};
export const parameters10: OperationParameter = {
parameterPath: "parameters",
mapper: TagsPatchResourceMapper
};
export const operationId: OperationURLParameter = {
parameterPath: "operationId",
mapper: {
serializedName: "operationId",
required: true,
type: {
name: "String"
}
}
};
@@ -0,0 +1,941 @@
/*
* 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 { PagedAsyncIterableIterator } from "@azure/core-paging";
import { DeploymentOperations } from "../operationsInterfaces";
import * as coreClient from "@azure/core-client";
import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
import { ResourceManagementClient } from "../resourceManagementClient";
import {
DeploymentOperation,
DeploymentOperationsListAtScopeNextOptionalParams,
DeploymentOperationsListAtScopeOptionalParams,
DeploymentOperationsListAtTenantScopeNextOptionalParams,
DeploymentOperationsListAtTenantScopeOptionalParams,
DeploymentOperationsListAtManagementGroupScopeNextOptionalParams,
DeploymentOperationsListAtManagementGroupScopeOptionalParams,
DeploymentOperationsListAtSubscriptionScopeNextOptionalParams,
DeploymentOperationsListAtSubscriptionScopeOptionalParams,
DeploymentOperationsListNextOptionalParams,
DeploymentOperationsListOptionalParams,
DeploymentOperationsGetAtScopeOptionalParams,
DeploymentOperationsGetAtScopeResponse,
DeploymentOperationsListAtScopeResponse,
DeploymentOperationsGetAtTenantScopeOptionalParams,
DeploymentOperationsGetAtTenantScopeResponse,
DeploymentOperationsListAtTenantScopeResponse,
DeploymentOperationsGetAtManagementGroupScopeOptionalParams,
DeploymentOperationsGetAtManagementGroupScopeResponse,
DeploymentOperationsListAtManagementGroupScopeResponse,
DeploymentOperationsGetAtSubscriptionScopeOptionalParams,
DeploymentOperationsGetAtSubscriptionScopeResponse,
DeploymentOperationsListAtSubscriptionScopeResponse,
DeploymentOperationsGetOptionalParams,
DeploymentOperationsGetResponse,
DeploymentOperationsListResponse,
DeploymentOperationsListAtScopeNextResponse,
DeploymentOperationsListAtTenantScopeNextResponse,
DeploymentOperationsListAtManagementGroupScopeNextResponse,
DeploymentOperationsListAtSubscriptionScopeNextResponse,
DeploymentOperationsListNextResponse
} from "../models";
/// <reference lib="esnext.asynciterable" />
/** Class containing DeploymentOperations operations. */
export class DeploymentOperationsImpl implements DeploymentOperations {
private readonly client: ResourceManagementClient;
/**
* Initialize a new instance of the class DeploymentOperations class.
* @param client Reference to the service client
*/
constructor(client: ResourceManagementClient) {
this.client = client;
}
/**
* Gets all deployments operations for a deployment.
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
public listAtScope(
scope: string,
deploymentName: string,
options?: DeploymentOperationsListAtScopeOptionalParams
): PagedAsyncIterableIterator<DeploymentOperation> {
const iter = this.listAtScopePagingAll(scope, deploymentName, options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: () => {
return this.listAtScopePagingPage(scope, deploymentName, options);
}
};
}
private async *listAtScopePagingPage(
scope: string,
deploymentName: string,
options?: DeploymentOperationsListAtScopeOptionalParams
): AsyncIterableIterator<DeploymentOperation[]> {
let result = await this._listAtScope(scope, deploymentName, options);
yield result.value || [];
let continuationToken = result.nextLink;
while (continuationToken) {
result = await this._listAtScopeNext(
scope,
deploymentName,
continuationToken,
options
);
continuationToken = result.nextLink;
yield result.value || [];
}
}
private async *listAtScopePagingAll(
scope: string,
deploymentName: string,
options?: DeploymentOperationsListAtScopeOptionalParams
): AsyncIterableIterator<DeploymentOperation> {
for await (const page of this.listAtScopePagingPage(
scope,
deploymentName,
options
)) {
yield* page;
}
}
/**
* Gets all deployments operations for a deployment.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
public listAtTenantScope(
deploymentName: string,
options?: DeploymentOperationsListAtTenantScopeOptionalParams
): PagedAsyncIterableIterator<DeploymentOperation> {
const iter = this.listAtTenantScopePagingAll(deploymentName, options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: () => {
return this.listAtTenantScopePagingPage(deploymentName, options);
}
};
}
private async *listAtTenantScopePagingPage(
deploymentName: string,
options?: DeploymentOperationsListAtTenantScopeOptionalParams
): AsyncIterableIterator<DeploymentOperation[]> {
let result = await this._listAtTenantScope(deploymentName, options);
yield result.value || [];
let continuationToken = result.nextLink;
while (continuationToken) {
result = await this._listAtTenantScopeNext(
deploymentName,
continuationToken,
options
);
continuationToken = result.nextLink;
yield result.value || [];
}
}
private async *listAtTenantScopePagingAll(
deploymentName: string,
options?: DeploymentOperationsListAtTenantScopeOptionalParams
): AsyncIterableIterator<DeploymentOperation> {
for await (const page of this.listAtTenantScopePagingPage(
deploymentName,
options
)) {
yield* page;
}
}
/**
* Gets all deployments operations for a deployment.
* @param groupId The management group ID.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
public listAtManagementGroupScope(
groupId: string,
deploymentName: string,
options?: DeploymentOperationsListAtManagementGroupScopeOptionalParams
): PagedAsyncIterableIterator<DeploymentOperation> {
const iter = this.listAtManagementGroupScopePagingAll(
groupId,
deploymentName,
options
);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: () => {
return this.listAtManagementGroupScopePagingPage(
groupId,
deploymentName,
options
);
}
};
}
private async *listAtManagementGroupScopePagingPage(
groupId: string,
deploymentName: string,
options?: DeploymentOperationsListAtManagementGroupScopeOptionalParams
): AsyncIterableIterator<DeploymentOperation[]> {
let result = await this._listAtManagementGroupScope(
groupId,
deploymentName,
options
);
yield result.value || [];
let continuationToken = result.nextLink;
while (continuationToken) {
result = await this._listAtManagementGroupScopeNext(
groupId,
deploymentName,
continuationToken,
options
);
continuationToken = result.nextLink;
yield result.value || [];
}
}
private async *listAtManagementGroupScopePagingAll(
groupId: string,
deploymentName: string,
options?: DeploymentOperationsListAtManagementGroupScopeOptionalParams
): AsyncIterableIterator<DeploymentOperation> {
for await (const page of this.listAtManagementGroupScopePagingPage(
groupId,
deploymentName,
options
)) {
yield* page;
}
}
/**
* Gets all deployments operations for a deployment.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
public listAtSubscriptionScope(
deploymentName: string,
options?: DeploymentOperationsListAtSubscriptionScopeOptionalParams
): PagedAsyncIterableIterator<DeploymentOperation> {
const iter = this.listAtSubscriptionScopePagingAll(deploymentName, options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: () => {
return this.listAtSubscriptionScopePagingPage(deploymentName, options);
}
};
}
private async *listAtSubscriptionScopePagingPage(
deploymentName: string,
options?: DeploymentOperationsListAtSubscriptionScopeOptionalParams
): AsyncIterableIterator<DeploymentOperation[]> {
let result = await this._listAtSubscriptionScope(deploymentName, options);
yield result.value || [];
let continuationToken = result.nextLink;
while (continuationToken) {
result = await this._listAtSubscriptionScopeNext(
deploymentName,
continuationToken,
options
);
continuationToken = result.nextLink;
yield result.value || [];
}
}
private async *listAtSubscriptionScopePagingAll(
deploymentName: string,
options?: DeploymentOperationsListAtSubscriptionScopeOptionalParams
): AsyncIterableIterator<DeploymentOperation> {
for await (const page of this.listAtSubscriptionScopePagingPage(
deploymentName,
options
)) {
yield* page;
}
}
/**
* Gets all deployments operations for a deployment.
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
public list(
resourceGroupName: string,
deploymentName: string,
options?: DeploymentOperationsListOptionalParams
): PagedAsyncIterableIterator<DeploymentOperation> {
const iter = this.listPagingAll(resourceGroupName, deploymentName, options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: () => {
return this.listPagingPage(resourceGroupName, deploymentName, options);
}
};
}
private async *listPagingPage(
resourceGroupName: string,
deploymentName: string,
options?: DeploymentOperationsListOptionalParams
): AsyncIterableIterator<DeploymentOperation[]> {
let result = await this._list(resourceGroupName, deploymentName, options);
yield result.value || [];
let continuationToken = result.nextLink;
while (continuationToken) {
result = await this._listNext(
resourceGroupName,
deploymentName,
continuationToken,
options
);
continuationToken = result.nextLink;
yield result.value || [];
}
}
private async *listPagingAll(
resourceGroupName: string,
deploymentName: string,
options?: DeploymentOperationsListOptionalParams
): AsyncIterableIterator<DeploymentOperation> {
for await (const page of this.listPagingPage(
resourceGroupName,
deploymentName,
options
)) {
yield* page;
}
}
/**
* Gets a deployments operation.
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param operationId The ID of the operation to get.
* @param options The options parameters.
*/
getAtScope(
scope: string,
deploymentName: string,
operationId: string,
options?: DeploymentOperationsGetAtScopeOptionalParams
): Promise<DeploymentOperationsGetAtScopeResponse> {
return this.client.sendOperationRequest(
{ scope, deploymentName, operationId, options },
getAtScopeOperationSpec
);
}
/**
* Gets all deployments operations for a deployment.
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
private _listAtScope(
scope: string,
deploymentName: string,
options?: DeploymentOperationsListAtScopeOptionalParams
): Promise<DeploymentOperationsListAtScopeResponse> {
return this.client.sendOperationRequest(
{ scope, deploymentName, options },
listAtScopeOperationSpec
);
}
/**
* Gets a deployments operation.
* @param deploymentName The name of the deployment.
* @param operationId The ID of the operation to get.
* @param options The options parameters.
*/
getAtTenantScope(
deploymentName: string,
operationId: string,
options?: DeploymentOperationsGetAtTenantScopeOptionalParams
): Promise<DeploymentOperationsGetAtTenantScopeResponse> {
return this.client.sendOperationRequest(
{ deploymentName, operationId, options },
getAtTenantScopeOperationSpec
);
}
/**
* Gets all deployments operations for a deployment.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
private _listAtTenantScope(
deploymentName: string,
options?: DeploymentOperationsListAtTenantScopeOptionalParams
): Promise<DeploymentOperationsListAtTenantScopeResponse> {
return this.client.sendOperationRequest(
{ deploymentName, options },
listAtTenantScopeOperationSpec
);
}
/**
* Gets a deployments operation.
* @param groupId The management group ID.
* @param deploymentName The name of the deployment.
* @param operationId The ID of the operation to get.
* @param options The options parameters.
*/
getAtManagementGroupScope(
groupId: string,
deploymentName: string,
operationId: string,
options?: DeploymentOperationsGetAtManagementGroupScopeOptionalParams
): Promise<DeploymentOperationsGetAtManagementGroupScopeResponse> {
return this.client.sendOperationRequest(
{ groupId, deploymentName, operationId, options },
getAtManagementGroupScopeOperationSpec
);
}
/**
* Gets all deployments operations for a deployment.
* @param groupId The management group ID.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
private _listAtManagementGroupScope(
groupId: string,
deploymentName: string,
options?: DeploymentOperationsListAtManagementGroupScopeOptionalParams
): Promise<DeploymentOperationsListAtManagementGroupScopeResponse> {
return this.client.sendOperationRequest(
{ groupId, deploymentName, options },
listAtManagementGroupScopeOperationSpec
);
}
/**
* Gets a deployments operation.
* @param deploymentName The name of the deployment.
* @param operationId The ID of the operation to get.
* @param options The options parameters.
*/
getAtSubscriptionScope(
deploymentName: string,
operationId: string,
options?: DeploymentOperationsGetAtSubscriptionScopeOptionalParams
): Promise<DeploymentOperationsGetAtSubscriptionScopeResponse> {
return this.client.sendOperationRequest(
{ deploymentName, operationId, options },
getAtSubscriptionScopeOperationSpec
);
}
/**
* Gets all deployments operations for a deployment.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
private _listAtSubscriptionScope(
deploymentName: string,
options?: DeploymentOperationsListAtSubscriptionScopeOptionalParams
): Promise<DeploymentOperationsListAtSubscriptionScopeResponse> {
return this.client.sendOperationRequest(
{ deploymentName, options },
listAtSubscriptionScopeOperationSpec
);
}
/**
* Gets a deployments operation.
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param deploymentName The name of the deployment.
* @param operationId The ID of the operation to get.
* @param options The options parameters.
*/
get(
resourceGroupName: string,
deploymentName: string,
operationId: string,
options?: DeploymentOperationsGetOptionalParams
): Promise<DeploymentOperationsGetResponse> {
return this.client.sendOperationRequest(
{ resourceGroupName, deploymentName, operationId, options },
getOperationSpec
);
}
/**
* Gets all deployments operations for a deployment.
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
private _list(
resourceGroupName: string,
deploymentName: string,
options?: DeploymentOperationsListOptionalParams
): Promise<DeploymentOperationsListResponse> {
return this.client.sendOperationRequest(
{ resourceGroupName, deploymentName, options },
listOperationSpec
);
}
/**
* ListAtScopeNext
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param nextLink The nextLink from the previous successful call to the ListAtScope method.
* @param options The options parameters.
*/
private _listAtScopeNext(
scope: string,
deploymentName: string,
nextLink: string,
options?: DeploymentOperationsListAtScopeNextOptionalParams
): Promise<DeploymentOperationsListAtScopeNextResponse> {
return this.client.sendOperationRequest(
{ scope, deploymentName, nextLink, options },
listAtScopeNextOperationSpec
);
}
/**
* ListAtTenantScopeNext
* @param deploymentName The name of the deployment.
* @param nextLink The nextLink from the previous successful call to the ListAtTenantScope method.
* @param options The options parameters.
*/
private _listAtTenantScopeNext(
deploymentName: string,
nextLink: string,
options?: DeploymentOperationsListAtTenantScopeNextOptionalParams
): Promise<DeploymentOperationsListAtTenantScopeNextResponse> {
return this.client.sendOperationRequest(
{ deploymentName, nextLink, options },
listAtTenantScopeNextOperationSpec
);
}
/**
* ListAtManagementGroupScopeNext
* @param groupId The management group ID.
* @param deploymentName The name of the deployment.
* @param nextLink The nextLink from the previous successful call to the ListAtManagementGroupScope
* method.
* @param options The options parameters.
*/
private _listAtManagementGroupScopeNext(
groupId: string,
deploymentName: string,
nextLink: string,
options?: DeploymentOperationsListAtManagementGroupScopeNextOptionalParams
): Promise<DeploymentOperationsListAtManagementGroupScopeNextResponse> {
return this.client.sendOperationRequest(
{ groupId, deploymentName, nextLink, options },
listAtManagementGroupScopeNextOperationSpec
);
}
/**
* ListAtSubscriptionScopeNext
* @param deploymentName The name of the deployment.
* @param nextLink The nextLink from the previous successful call to the ListAtSubscriptionScope
* method.
* @param options The options parameters.
*/
private _listAtSubscriptionScopeNext(
deploymentName: string,
nextLink: string,
options?: DeploymentOperationsListAtSubscriptionScopeNextOptionalParams
): Promise<DeploymentOperationsListAtSubscriptionScopeNextResponse> {
return this.client.sendOperationRequest(
{ deploymentName, nextLink, options },
listAtSubscriptionScopeNextOperationSpec
);
}
/**
* ListNext
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param deploymentName The name of the deployment.
* @param nextLink The nextLink from the previous successful call to the List method.
* @param options The options parameters.
*/
private _listNext(
resourceGroupName: string,
deploymentName: string,
nextLink: string,
options?: DeploymentOperationsListNextOptionalParams
): Promise<DeploymentOperationsListNextResponse> {
return this.client.sendOperationRequest(
{ resourceGroupName, deploymentName, nextLink, options },
listNextOperationSpec
);
}
}
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const getAtScopeOperationSpec: coreClient.OperationSpec = {
path:
"/{scope}/providers/Microsoft.Resources/deployments/{deploymentName}/operations/{operationId}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.DeploymentOperation
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.scope,
Parameters.deploymentName,
Parameters.operationId
],
headerParameters: [Parameters.accept],
serializer
};
const listAtScopeOperationSpec: coreClient.OperationSpec = {
path:
"/{scope}/providers/Microsoft.Resources/deployments/{deploymentName}/operations",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.DeploymentOperationsListResult
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion, Parameters.top],
urlParameters: [
Parameters.$host,
Parameters.scope,
Parameters.deploymentName
],
headerParameters: [Parameters.accept],
serializer
};
const getAtTenantScopeOperationSpec: coreClient.OperationSpec = {
path:
"/providers/Microsoft.Resources/deployments/{deploymentName}/operations/{operationId}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.DeploymentOperation
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.deploymentName,
Parameters.operationId
],
headerParameters: [Parameters.accept],
serializer
};
const listAtTenantScopeOperationSpec: coreClient.OperationSpec = {
path:
"/providers/Microsoft.Resources/deployments/{deploymentName}/operations",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.DeploymentOperationsListResult
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion, Parameters.top],
urlParameters: [Parameters.$host, Parameters.deploymentName],
headerParameters: [Parameters.accept],
serializer
};
const getAtManagementGroupScopeOperationSpec: coreClient.OperationSpec = {
path:
"/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/operations/{operationId}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.DeploymentOperation
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.deploymentName,
Parameters.groupId,
Parameters.operationId
],
headerParameters: [Parameters.accept],
serializer
};
const listAtManagementGroupScopeOperationSpec: coreClient.OperationSpec = {
path:
"/providers/Microsoft.Management/managementGroups/{groupId}/providers/Microsoft.Resources/deployments/{deploymentName}/operations",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.DeploymentOperationsListResult
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion, Parameters.top],
urlParameters: [
Parameters.$host,
Parameters.deploymentName,
Parameters.groupId
],
headerParameters: [Parameters.accept],
serializer
};
const getAtSubscriptionScopeOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/operations/{operationId}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.DeploymentOperation
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.deploymentName,
Parameters.subscriptionId,
Parameters.operationId
],
headerParameters: [Parameters.accept],
serializer
};
const listAtSubscriptionScopeOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/providers/Microsoft.Resources/deployments/{deploymentName}/operations",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.DeploymentOperationsListResult
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion, Parameters.top],
urlParameters: [
Parameters.$host,
Parameters.deploymentName,
Parameters.subscriptionId
],
headerParameters: [Parameters.accept],
serializer
};
const getOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations/{operationId}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.DeploymentOperation
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.deploymentName,
Parameters.subscriptionId,
Parameters.resourceGroupName,
Parameters.operationId
],
headerParameters: [Parameters.accept],
serializer
};
const listOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/deployments/{deploymentName}/operations",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.DeploymentOperationsListResult
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion, Parameters.top],
urlParameters: [
Parameters.$host,
Parameters.deploymentName,
Parameters.subscriptionId,
Parameters.resourceGroupName
],
headerParameters: [Parameters.accept],
serializer
};
const listAtScopeNextOperationSpec: coreClient.OperationSpec = {
path: "{nextLink}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.DeploymentOperationsListResult
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion, Parameters.top],
urlParameters: [
Parameters.$host,
Parameters.nextLink,
Parameters.scope,
Parameters.deploymentName
],
headerParameters: [Parameters.accept],
serializer
};
const listAtTenantScopeNextOperationSpec: coreClient.OperationSpec = {
path: "{nextLink}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.DeploymentOperationsListResult
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion, Parameters.top],
urlParameters: [
Parameters.$host,
Parameters.nextLink,
Parameters.deploymentName
],
headerParameters: [Parameters.accept],
serializer
};
const listAtManagementGroupScopeNextOperationSpec: coreClient.OperationSpec = {
path: "{nextLink}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.DeploymentOperationsListResult
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion, Parameters.top],
urlParameters: [
Parameters.$host,
Parameters.nextLink,
Parameters.deploymentName,
Parameters.groupId
],
headerParameters: [Parameters.accept],
serializer
};
const listAtSubscriptionScopeNextOperationSpec: coreClient.OperationSpec = {
path: "{nextLink}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.DeploymentOperationsListResult
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion, Parameters.top],
urlParameters: [
Parameters.$host,
Parameters.nextLink,
Parameters.deploymentName,
Parameters.subscriptionId
],
headerParameters: [Parameters.accept],
serializer
};
const listNextOperationSpec: coreClient.OperationSpec = {
path: "{nextLink}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.DeploymentOperationsListResult
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion, Parameters.top],
urlParameters: [
Parameters.$host,
Parameters.nextLink,
Parameters.deploymentName,
Parameters.subscriptionId,
Parameters.resourceGroupName
],
headerParameters: [Parameters.accept],
serializer
};
File diff suppressed because it is too large Load Diff
+16
View File
@@ -0,0 +1,16 @@
/*
* 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 "./operations";
export * from "./deployments";
export * from "./providers";
export * from "./providerResourceTypes";
export * from "./resources";
export * from "./resourceGroups";
export * from "./tagsOperations";
export * from "./deploymentOperations";
+137
View File
@@ -0,0 +1,137 @@
/*
* 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 { PagedAsyncIterableIterator } from "@azure/core-paging";
import { Operations } from "../operationsInterfaces";
import * as coreClient from "@azure/core-client";
import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
import { ResourceManagementClient } from "../resourceManagementClient";
import {
Operation,
OperationsListNextOptionalParams,
OperationsListOptionalParams,
OperationsListResponse,
OperationsListNextResponse
} from "../models";
/// <reference lib="esnext.asynciterable" />
/** Class containing Operations operations. */
export class OperationsImpl implements Operations {
private readonly client: ResourceManagementClient;
/**
* Initialize a new instance of the class Operations class.
* @param client Reference to the service client
*/
constructor(client: ResourceManagementClient) {
this.client = client;
}
/**
* Lists all of the available Microsoft.Resources REST API operations.
* @param options The options parameters.
*/
public list(
options?: OperationsListOptionalParams
): PagedAsyncIterableIterator<Operation> {
const iter = this.listPagingAll(options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: () => {
return this.listPagingPage(options);
}
};
}
private async *listPagingPage(
options?: OperationsListOptionalParams
): AsyncIterableIterator<Operation[]> {
let result = await this._list(options);
yield result.value || [];
let continuationToken = result.nextLink;
while (continuationToken) {
result = await this._listNext(continuationToken, options);
continuationToken = result.nextLink;
yield result.value || [];
}
}
private async *listPagingAll(
options?: OperationsListOptionalParams
): AsyncIterableIterator<Operation> {
for await (const page of this.listPagingPage(options)) {
yield* page;
}
}
/**
* Lists all of the available Microsoft.Resources REST API operations.
* @param options The options parameters.
*/
private _list(
options?: OperationsListOptionalParams
): Promise<OperationsListResponse> {
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.
*/
private _listNext(
nextLink: string,
options?: OperationsListNextOptionalParams
): Promise<OperationsListNextResponse> {
return this.client.sendOperationRequest(
{ nextLink, options },
listNextOperationSpec
);
}
}
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const listOperationSpec: coreClient.OperationSpec = {
path: "/providers/Microsoft.Resources/operations",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.OperationListResult
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host],
headerParameters: [Parameters.accept],
serializer
};
const listNextOperationSpec: coreClient.OperationSpec = {
path: "{nextLink}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.OperationListResult
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host, Parameters.nextLink],
headerParameters: [Parameters.accept],
serializer
};
@@ -0,0 +1,69 @@
/*
* 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 { ProviderResourceTypes } from "../operationsInterfaces";
import * as coreClient from "@azure/core-client";
import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
import { ResourceManagementClient } from "../resourceManagementClient";
import {
ProviderResourceTypesListOptionalParams,
ProviderResourceTypesListResponse
} from "../models";
/** Class containing ProviderResourceTypes operations. */
export class ProviderResourceTypesImpl implements ProviderResourceTypes {
private readonly client: ResourceManagementClient;
/**
* Initialize a new instance of the class ProviderResourceTypes class.
* @param client Reference to the service client
*/
constructor(client: ResourceManagementClient) {
this.client = client;
}
/**
* List the resource types for a specified resource provider.
* @param resourceProviderNamespace The namespace of the resource provider.
* @param options The options parameters.
*/
list(
resourceProviderNamespace: string,
options?: ProviderResourceTypesListOptionalParams
): Promise<ProviderResourceTypesListResponse> {
return this.client.sendOperationRequest(
{ resourceProviderNamespace, options },
listOperationSpec
);
}
}
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const listOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/resourceTypes",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.ProviderResourceTypeListResult
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion, Parameters.expand],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceProviderNamespace
],
headerParameters: [Parameters.accept],
serializer
};
+470
View File
@@ -0,0 +1,470 @@
/*
* 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 { PagedAsyncIterableIterator } from "@azure/core-paging";
import { Providers } from "../operationsInterfaces";
import * as coreClient from "@azure/core-client";
import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
import { ResourceManagementClient } from "../resourceManagementClient";
import {
Provider,
ProvidersListNextOptionalParams,
ProvidersListOptionalParams,
ProvidersListAtTenantScopeNextOptionalParams,
ProvidersListAtTenantScopeOptionalParams,
ProvidersUnregisterOptionalParams,
ProvidersUnregisterResponse,
ProvidersRegisterAtManagementGroupScopeOptionalParams,
ProvidersProviderPermissionsOptionalParams,
ProvidersProviderPermissionsResponse,
ProvidersRegisterOptionalParams,
ProvidersRegisterResponse,
ProvidersListResponse,
ProvidersListAtTenantScopeResponse,
ProvidersGetOptionalParams,
ProvidersGetResponse,
ProvidersGetAtTenantScopeOptionalParams,
ProvidersGetAtTenantScopeResponse,
ProvidersListNextResponse,
ProvidersListAtTenantScopeNextResponse
} from "../models";
/// <reference lib="esnext.asynciterable" />
/** Class containing Providers operations. */
export class ProvidersImpl implements Providers {
private readonly client: ResourceManagementClient;
/**
* Initialize a new instance of the class Providers class.
* @param client Reference to the service client
*/
constructor(client: ResourceManagementClient) {
this.client = client;
}
/**
* Gets all resource providers for a subscription.
* @param options The options parameters.
*/
public list(
options?: ProvidersListOptionalParams
): PagedAsyncIterableIterator<Provider> {
const iter = this.listPagingAll(options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: () => {
return this.listPagingPage(options);
}
};
}
private async *listPagingPage(
options?: ProvidersListOptionalParams
): AsyncIterableIterator<Provider[]> {
let result = await this._list(options);
yield result.value || [];
let continuationToken = result.nextLink;
while (continuationToken) {
result = await this._listNext(continuationToken, options);
continuationToken = result.nextLink;
yield result.value || [];
}
}
private async *listPagingAll(
options?: ProvidersListOptionalParams
): AsyncIterableIterator<Provider> {
for await (const page of this.listPagingPage(options)) {
yield* page;
}
}
/**
* Gets all resource providers for the tenant.
* @param options The options parameters.
*/
public listAtTenantScope(
options?: ProvidersListAtTenantScopeOptionalParams
): PagedAsyncIterableIterator<Provider> {
const iter = this.listAtTenantScopePagingAll(options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: () => {
return this.listAtTenantScopePagingPage(options);
}
};
}
private async *listAtTenantScopePagingPage(
options?: ProvidersListAtTenantScopeOptionalParams
): AsyncIterableIterator<Provider[]> {
let result = await this._listAtTenantScope(options);
yield result.value || [];
let continuationToken = result.nextLink;
while (continuationToken) {
result = await this._listAtTenantScopeNext(continuationToken, options);
continuationToken = result.nextLink;
yield result.value || [];
}
}
private async *listAtTenantScopePagingAll(
options?: ProvidersListAtTenantScopeOptionalParams
): AsyncIterableIterator<Provider> {
for await (const page of this.listAtTenantScopePagingPage(options)) {
yield* page;
}
}
/**
* Unregisters a subscription from a resource provider.
* @param resourceProviderNamespace The namespace of the resource provider to unregister.
* @param options The options parameters.
*/
unregister(
resourceProviderNamespace: string,
options?: ProvidersUnregisterOptionalParams
): Promise<ProvidersUnregisterResponse> {
return this.client.sendOperationRequest(
{ resourceProviderNamespace, options },
unregisterOperationSpec
);
}
/**
* Registers a management group with a resource provider.
* @param resourceProviderNamespace The namespace of the resource provider to register.
* @param groupId The management group ID.
* @param options The options parameters.
*/
registerAtManagementGroupScope(
resourceProviderNamespace: string,
groupId: string,
options?: ProvidersRegisterAtManagementGroupScopeOptionalParams
): Promise<void> {
return this.client.sendOperationRequest(
{ resourceProviderNamespace, groupId, options },
registerAtManagementGroupScopeOperationSpec
);
}
/**
* Get the provider permissions.
* @param resourceProviderNamespace The namespace of the resource provider.
* @param options The options parameters.
*/
providerPermissions(
resourceProviderNamespace: string,
options?: ProvidersProviderPermissionsOptionalParams
): Promise<ProvidersProviderPermissionsResponse> {
return this.client.sendOperationRequest(
{ resourceProviderNamespace, options },
providerPermissionsOperationSpec
);
}
/**
* Registers a subscription with a resource provider.
* @param resourceProviderNamespace The namespace of the resource provider to register.
* @param options The options parameters.
*/
register(
resourceProviderNamespace: string,
options?: ProvidersRegisterOptionalParams
): Promise<ProvidersRegisterResponse> {
return this.client.sendOperationRequest(
{ resourceProviderNamespace, options },
registerOperationSpec
);
}
/**
* Gets all resource providers for a subscription.
* @param options The options parameters.
*/
private _list(
options?: ProvidersListOptionalParams
): Promise<ProvidersListResponse> {
return this.client.sendOperationRequest({ options }, listOperationSpec);
}
/**
* Gets all resource providers for the tenant.
* @param options The options parameters.
*/
private _listAtTenantScope(
options?: ProvidersListAtTenantScopeOptionalParams
): Promise<ProvidersListAtTenantScopeResponse> {
return this.client.sendOperationRequest(
{ options },
listAtTenantScopeOperationSpec
);
}
/**
* Gets the specified resource provider.
* @param resourceProviderNamespace The namespace of the resource provider.
* @param options The options parameters.
*/
get(
resourceProviderNamespace: string,
options?: ProvidersGetOptionalParams
): Promise<ProvidersGetResponse> {
return this.client.sendOperationRequest(
{ resourceProviderNamespace, options },
getOperationSpec
);
}
/**
* Gets the specified resource provider at the tenant level.
* @param resourceProviderNamespace The namespace of the resource provider.
* @param options The options parameters.
*/
getAtTenantScope(
resourceProviderNamespace: string,
options?: ProvidersGetAtTenantScopeOptionalParams
): Promise<ProvidersGetAtTenantScopeResponse> {
return this.client.sendOperationRequest(
{ resourceProviderNamespace, options },
getAtTenantScopeOperationSpec
);
}
/**
* ListNext
* @param nextLink The nextLink from the previous successful call to the List method.
* @param options The options parameters.
*/
private _listNext(
nextLink: string,
options?: ProvidersListNextOptionalParams
): Promise<ProvidersListNextResponse> {
return this.client.sendOperationRequest(
{ nextLink, options },
listNextOperationSpec
);
}
/**
* ListAtTenantScopeNext
* @param nextLink The nextLink from the previous successful call to the ListAtTenantScope method.
* @param options The options parameters.
*/
private _listAtTenantScopeNext(
nextLink: string,
options?: ProvidersListAtTenantScopeNextOptionalParams
): Promise<ProvidersListAtTenantScopeNextResponse> {
return this.client.sendOperationRequest(
{ nextLink, options },
listAtTenantScopeNextOperationSpec
);
}
}
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const unregisterOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/unregister",
httpMethod: "POST",
responses: {
200: {
bodyMapper: Mappers.Provider
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceProviderNamespace
],
headerParameters: [Parameters.accept],
serializer
};
const registerAtManagementGroupScopeOperationSpec: coreClient.OperationSpec = {
path:
"/providers/Microsoft.Management/managementGroups/{groupId}/providers/{resourceProviderNamespace}/register",
httpMethod: "POST",
responses: {
200: {},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.groupId,
Parameters.resourceProviderNamespace
],
headerParameters: [Parameters.accept],
serializer
};
const providerPermissionsOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/providerPermissions",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.ProviderPermissionListResult
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceProviderNamespace
],
headerParameters: [Parameters.accept],
serializer
};
const registerOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/register",
httpMethod: "POST",
responses: {
200: {
bodyMapper: Mappers.Provider
},
default: {
bodyMapper: Mappers.CloudError
}
},
requestBody: Parameters.properties,
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceProviderNamespace
],
headerParameters: [Parameters.accept, Parameters.contentType],
mediaType: "json",
serializer
};
const listOperationSpec: coreClient.OperationSpec = {
path: "/subscriptions/{subscriptionId}/providers",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.ProviderListResult
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion, Parameters.expand],
urlParameters: [Parameters.$host, Parameters.subscriptionId],
headerParameters: [Parameters.accept],
serializer
};
const listAtTenantScopeOperationSpec: coreClient.OperationSpec = {
path: "/providers",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.ProviderListResult
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion, Parameters.expand],
urlParameters: [Parameters.$host],
headerParameters: [Parameters.accept],
serializer
};
const getOperationSpec: coreClient.OperationSpec = {
path: "/subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.Provider
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion, Parameters.expand],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceProviderNamespace
],
headerParameters: [Parameters.accept],
serializer
};
const getAtTenantScopeOperationSpec: coreClient.OperationSpec = {
path: "/providers/{resourceProviderNamespace}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.Provider
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion, Parameters.expand],
urlParameters: [Parameters.$host, Parameters.resourceProviderNamespace],
headerParameters: [Parameters.accept],
serializer
};
const listNextOperationSpec: coreClient.OperationSpec = {
path: "{nextLink}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.ProviderListResult
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion, Parameters.expand],
urlParameters: [
Parameters.$host,
Parameters.nextLink,
Parameters.subscriptionId
],
headerParameters: [Parameters.accept],
serializer
};
const listAtTenantScopeNextOperationSpec: coreClient.OperationSpec = {
path: "{nextLink}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.ProviderListResult
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion, Parameters.expand],
urlParameters: [Parameters.$host, Parameters.nextLink],
headerParameters: [Parameters.accept],
serializer
};
+527
View File
@@ -0,0 +1,527 @@
/*
* 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 { PagedAsyncIterableIterator } from "@azure/core-paging";
import { ResourceGroups } from "../operationsInterfaces";
import * as coreClient from "@azure/core-client";
import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
import { ResourceManagementClient } from "../resourceManagementClient";
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
import { LroImpl } from "../lroImpl";
import {
ResourceGroup,
ResourceGroupsListNextOptionalParams,
ResourceGroupsListOptionalParams,
ResourceGroupsCheckExistenceOptionalParams,
ResourceGroupsCheckExistenceResponse,
ResourceGroupsCreateOrUpdateOptionalParams,
ResourceGroupsCreateOrUpdateResponse,
ResourceGroupsDeleteOptionalParams,
ResourceGroupsGetOptionalParams,
ResourceGroupsGetResponse,
ResourceGroupPatchable,
ResourceGroupsUpdateOptionalParams,
ResourceGroupsUpdateResponse,
ExportTemplateRequest,
ResourceGroupsExportTemplateOptionalParams,
ResourceGroupsExportTemplateResponse,
ResourceGroupsListResponse,
ResourceGroupsListNextResponse
} from "../models";
/// <reference lib="esnext.asynciterable" />
/** Class containing ResourceGroups operations. */
export class ResourceGroupsImpl implements ResourceGroups {
private readonly client: ResourceManagementClient;
/**
* Initialize a new instance of the class ResourceGroups class.
* @param client Reference to the service client
*/
constructor(client: ResourceManagementClient) {
this.client = client;
}
/**
* Gets all the resource groups for a subscription.
* @param options The options parameters.
*/
public list(
options?: ResourceGroupsListOptionalParams
): PagedAsyncIterableIterator<ResourceGroup> {
const iter = this.listPagingAll(options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: () => {
return this.listPagingPage(options);
}
};
}
private async *listPagingPage(
options?: ResourceGroupsListOptionalParams
): AsyncIterableIterator<ResourceGroup[]> {
let result = await this._list(options);
yield result.value || [];
let continuationToken = result.nextLink;
while (continuationToken) {
result = await this._listNext(continuationToken, options);
continuationToken = result.nextLink;
yield result.value || [];
}
}
private async *listPagingAll(
options?: ResourceGroupsListOptionalParams
): AsyncIterableIterator<ResourceGroup> {
for await (const page of this.listPagingPage(options)) {
yield* page;
}
}
/**
* Checks whether a resource group exists.
* @param resourceGroupName The name of the resource group to check. The name is case insensitive.
* @param options The options parameters.
*/
checkExistence(
resourceGroupName: string,
options?: ResourceGroupsCheckExistenceOptionalParams
): Promise<ResourceGroupsCheckExistenceResponse> {
return this.client.sendOperationRequest(
{ resourceGroupName, options },
checkExistenceOperationSpec
);
}
/**
* Creates or updates a resource group.
* @param resourceGroupName The name of the resource group to create or update. Can include
* alphanumeric, underscore, parentheses, hyphen, period (except at end), and Unicode characters that
* match the allowed characters.
* @param parameters Parameters supplied to the create or update a resource group.
* @param options The options parameters.
*/
createOrUpdate(
resourceGroupName: string,
parameters: ResourceGroup,
options?: ResourceGroupsCreateOrUpdateOptionalParams
): Promise<ResourceGroupsCreateOrUpdateResponse> {
return this.client.sendOperationRequest(
{ resourceGroupName, parameters, options },
createOrUpdateOperationSpec
);
}
/**
* When you delete a resource group, all of its resources are also deleted. Deleting a resource group
* deletes all of its template deployments and currently stored operations.
* @param resourceGroupName The name of the resource group to delete. The name is case insensitive.
* @param options The options parameters.
*/
async beginDelete(
resourceGroupName: string,
options?: ResourceGroupsDeleteOptionalParams
): Promise<PollerLike<PollOperationState<void>, void>> {
const directSendOperation = async (
args: coreClient.OperationArguments,
spec: coreClient.OperationSpec
): Promise<void> => {
return this.client.sendOperationRequest(args, spec);
};
const sendOperation = async (
args: coreClient.OperationArguments,
spec: coreClient.OperationSpec
) => {
let currentRawResponse:
| coreClient.FullOperationResponse
| undefined = undefined;
const providedCallback = args.options?.onResponse;
const callback: coreClient.RawResponseCallback = (
rawResponse: coreClient.FullOperationResponse,
flatResponse: unknown
) => {
currentRawResponse = rawResponse;
providedCallback?.(rawResponse, flatResponse);
};
const updatedArgs = {
...args,
options: {
...args.options,
onResponse: callback
}
};
const flatResponse = await directSendOperation(updatedArgs, spec);
return {
flatResponse,
rawResponse: {
statusCode: currentRawResponse!.status,
body: currentRawResponse!.parsedBody,
headers: currentRawResponse!.headers.toJSON()
}
};
};
const lro = new LroImpl(
sendOperation,
{ resourceGroupName, options },
deleteOperationSpec
);
const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs
});
await poller.poll();
return poller;
}
/**
* When you delete a resource group, all of its resources are also deleted. Deleting a resource group
* deletes all of its template deployments and currently stored operations.
* @param resourceGroupName The name of the resource group to delete. The name is case insensitive.
* @param options The options parameters.
*/
async beginDeleteAndWait(
resourceGroupName: string,
options?: ResourceGroupsDeleteOptionalParams
): Promise<void> {
const poller = await this.beginDelete(resourceGroupName, options);
return poller.pollUntilDone();
}
/**
* Gets a resource group.
* @param resourceGroupName The name of the resource group to get. The name is case insensitive.
* @param options The options parameters.
*/
get(
resourceGroupName: string,
options?: ResourceGroupsGetOptionalParams
): Promise<ResourceGroupsGetResponse> {
return this.client.sendOperationRequest(
{ resourceGroupName, options },
getOperationSpec
);
}
/**
* Resource groups can be updated through a simple PATCH operation to a group address. The format of
* the request is the same as that for creating a resource group. If a field is unspecified, the
* current value is retained.
* @param resourceGroupName The name of the resource group to update. The name is case insensitive.
* @param parameters Parameters supplied to update a resource group.
* @param options The options parameters.
*/
update(
resourceGroupName: string,
parameters: ResourceGroupPatchable,
options?: ResourceGroupsUpdateOptionalParams
): Promise<ResourceGroupsUpdateResponse> {
return this.client.sendOperationRequest(
{ resourceGroupName, parameters, options },
updateOperationSpec
);
}
/**
* Captures the specified resource group as a template.
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param parameters Parameters for exporting the template.
* @param options The options parameters.
*/
async beginExportTemplate(
resourceGroupName: string,
parameters: ExportTemplateRequest,
options?: ResourceGroupsExportTemplateOptionalParams
): Promise<
PollerLike<
PollOperationState<ResourceGroupsExportTemplateResponse>,
ResourceGroupsExportTemplateResponse
>
> {
const directSendOperation = async (
args: coreClient.OperationArguments,
spec: coreClient.OperationSpec
): Promise<ResourceGroupsExportTemplateResponse> => {
return this.client.sendOperationRequest(args, spec);
};
const sendOperation = async (
args: coreClient.OperationArguments,
spec: coreClient.OperationSpec
) => {
let currentRawResponse:
| coreClient.FullOperationResponse
| undefined = undefined;
const providedCallback = args.options?.onResponse;
const callback: coreClient.RawResponseCallback = (
rawResponse: coreClient.FullOperationResponse,
flatResponse: unknown
) => {
currentRawResponse = rawResponse;
providedCallback?.(rawResponse, flatResponse);
};
const updatedArgs = {
...args,
options: {
...args.options,
onResponse: callback
}
};
const flatResponse = await directSendOperation(updatedArgs, spec);
return {
flatResponse,
rawResponse: {
statusCode: currentRawResponse!.status,
body: currentRawResponse!.parsedBody,
headers: currentRawResponse!.headers.toJSON()
}
};
};
const lro = new LroImpl(
sendOperation,
{ resourceGroupName, parameters, options },
exportTemplateOperationSpec
);
const poller = new LroEngine(lro, {
resumeFrom: options?.resumeFrom,
intervalInMs: options?.updateIntervalInMs,
lroResourceLocationConfig: "location"
});
await poller.poll();
return poller;
}
/**
* Captures the specified resource group as a template.
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param parameters Parameters for exporting the template.
* @param options The options parameters.
*/
async beginExportTemplateAndWait(
resourceGroupName: string,
parameters: ExportTemplateRequest,
options?: ResourceGroupsExportTemplateOptionalParams
): Promise<ResourceGroupsExportTemplateResponse> {
const poller = await this.beginExportTemplate(
resourceGroupName,
parameters,
options
);
return poller.pollUntilDone();
}
/**
* Gets all the resource groups for a subscription.
* @param options The options parameters.
*/
private _list(
options?: ResourceGroupsListOptionalParams
): Promise<ResourceGroupsListResponse> {
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.
*/
private _listNext(
nextLink: string,
options?: ResourceGroupsListNextOptionalParams
): Promise<ResourceGroupsListNextResponse> {
return this.client.sendOperationRequest(
{ nextLink, options },
listNextOperationSpec
);
}
}
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const checkExistenceOperationSpec: coreClient.OperationSpec = {
path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}",
httpMethod: "HEAD",
responses: {
204: {},
404: {},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName
],
headerParameters: [Parameters.accept],
serializer
};
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}",
httpMethod: "PUT",
responses: {
200: {
bodyMapper: Mappers.ResourceGroup
},
201: {
bodyMapper: Mappers.ResourceGroup
},
default: {
bodyMapper: Mappers.CloudError
}
},
requestBody: Parameters.parameters6,
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName
],
headerParameters: [Parameters.accept, Parameters.contentType],
mediaType: "json",
serializer
};
const deleteOperationSpec: coreClient.OperationSpec = {
path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}",
httpMethod: "DELETE",
responses: {
200: {},
201: {},
202: {},
204: {},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion, Parameters.forceDeletionTypes],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName
],
headerParameters: [Parameters.accept],
serializer
};
const getOperationSpec: coreClient.OperationSpec = {
path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.ResourceGroup
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName
],
headerParameters: [Parameters.accept],
serializer
};
const updateOperationSpec: coreClient.OperationSpec = {
path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}",
httpMethod: "PATCH",
responses: {
200: {
bodyMapper: Mappers.ResourceGroup
},
default: {
bodyMapper: Mappers.CloudError
}
},
requestBody: Parameters.parameters7,
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName
],
headerParameters: [Parameters.accept, Parameters.contentType],
mediaType: "json",
serializer
};
const exportTemplateOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/exportTemplate",
httpMethod: "POST",
responses: {
200: {
bodyMapper: Mappers.ResourceGroupExportResult
},
201: {
bodyMapper: Mappers.ResourceGroupExportResult
},
202: {
bodyMapper: Mappers.ResourceGroupExportResult
},
204: {
bodyMapper: Mappers.ResourceGroupExportResult
},
default: {
bodyMapper: Mappers.CloudError
}
},
requestBody: Parameters.parameters8,
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.resourceGroupName1
],
headerParameters: [Parameters.accept, Parameters.contentType],
mediaType: "json",
serializer
};
const listOperationSpec: coreClient.OperationSpec = {
path: "/subscriptions/{subscriptionId}/resourcegroups",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.ResourceGroupListResult
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion, Parameters.filter, Parameters.top],
urlParameters: [Parameters.$host, Parameters.subscriptionId],
headerParameters: [Parameters.accept],
serializer
};
const listNextOperationSpec: coreClient.OperationSpec = {
path: "{nextLink}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.ResourceGroupListResult
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion, Parameters.filter, Parameters.top],
urlParameters: [
Parameters.$host,
Parameters.nextLink,
Parameters.subscriptionId
],
headerParameters: [Parameters.accept],
serializer
};
File diff suppressed because it is too large Load Diff
+451
View File
@@ -0,0 +1,451 @@
/*
* 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 { PagedAsyncIterableIterator } from "@azure/core-paging";
import { TagsOperations } from "../operationsInterfaces";
import * as coreClient from "@azure/core-client";
import * as Mappers from "../models/mappers";
import * as Parameters from "../models/parameters";
import { ResourceManagementClient } from "../resourceManagementClient";
import {
TagDetails,
TagsListNextOptionalParams,
TagsListOptionalParams,
TagsDeleteValueOptionalParams,
TagsCreateOrUpdateValueOptionalParams,
TagsCreateOrUpdateValueResponse,
TagsCreateOrUpdateOptionalParams,
TagsCreateOrUpdateResponse,
TagsDeleteOptionalParams,
TagsListResponse,
TagsResource,
TagsCreateOrUpdateAtScopeOptionalParams,
TagsCreateOrUpdateAtScopeResponse,
TagsPatchResource,
TagsUpdateAtScopeOptionalParams,
TagsUpdateAtScopeResponse,
TagsGetAtScopeOptionalParams,
TagsGetAtScopeResponse,
TagsDeleteAtScopeOptionalParams,
TagsListNextResponse
} from "../models";
/// <reference lib="esnext.asynciterable" />
/** Class containing TagsOperations operations. */
export class TagsOperationsImpl implements TagsOperations {
private readonly client: ResourceManagementClient;
/**
* Initialize a new instance of the class TagsOperations class.
* @param client Reference to the service client
*/
constructor(client: ResourceManagementClient) {
this.client = client;
}
/**
* This operation performs a union of predefined tags, resource tags, resource group tags and
* subscription tags, and returns a summary of usage for each tag name and value under the given
* subscription. In case of a large number of tags, this operation may return a previously cached
* result.
* @param options The options parameters.
*/
public list(
options?: TagsListOptionalParams
): PagedAsyncIterableIterator<TagDetails> {
const iter = this.listPagingAll(options);
return {
next() {
return iter.next();
},
[Symbol.asyncIterator]() {
return this;
},
byPage: () => {
return this.listPagingPage(options);
}
};
}
private async *listPagingPage(
options?: TagsListOptionalParams
): AsyncIterableIterator<TagDetails[]> {
let result = await this._list(options);
yield result.value || [];
let continuationToken = result.nextLink;
while (continuationToken) {
result = await this._listNext(continuationToken, options);
continuationToken = result.nextLink;
yield result.value || [];
}
}
private async *listPagingAll(
options?: TagsListOptionalParams
): AsyncIterableIterator<TagDetails> {
for await (const page of this.listPagingPage(options)) {
yield* page;
}
}
/**
* This operation allows deleting a value from the list of predefined values for an existing predefined
* tag name. The value being deleted must not be in use as a tag value for the given tag name for any
* resource.
* @param tagName The name of the tag.
* @param tagValue The value of the tag to delete.
* @param options The options parameters.
*/
deleteValue(
tagName: string,
tagValue: string,
options?: TagsDeleteValueOptionalParams
): Promise<void> {
return this.client.sendOperationRequest(
{ tagName, tagValue, options },
deleteValueOperationSpec
);
}
/**
* This operation allows adding a value to the list of predefined values for an existing predefined tag
* name. A tag value can have a maximum of 256 characters.
* @param tagName The name of the tag.
* @param tagValue The value of the tag to create.
* @param options The options parameters.
*/
createOrUpdateValue(
tagName: string,
tagValue: string,
options?: TagsCreateOrUpdateValueOptionalParams
): Promise<TagsCreateOrUpdateValueResponse> {
return this.client.sendOperationRequest(
{ tagName, tagValue, options },
createOrUpdateValueOperationSpec
);
}
/**
* This operation allows adding a name to the list of predefined tag names for the given subscription.
* A tag name can have a maximum of 512 characters and is case-insensitive. Tag names cannot have the
* following prefixes which are reserved for Azure use: 'microsoft', 'azure', 'windows'.
* @param tagName The name of the tag to create.
* @param options The options parameters.
*/
createOrUpdate(
tagName: string,
options?: TagsCreateOrUpdateOptionalParams
): Promise<TagsCreateOrUpdateResponse> {
return this.client.sendOperationRequest(
{ tagName, options },
createOrUpdateOperationSpec
);
}
/**
* This operation allows deleting a name from the list of predefined tag names for the given
* subscription. The name being deleted must not be in use as a tag name for any resource. All
* predefined values for the given name must have already been deleted.
* @param tagName The name of the tag.
* @param options The options parameters.
*/
delete(tagName: string, options?: TagsDeleteOptionalParams): Promise<void> {
return this.client.sendOperationRequest(
{ tagName, options },
deleteOperationSpec
);
}
/**
* This operation performs a union of predefined tags, resource tags, resource group tags and
* subscription tags, and returns a summary of usage for each tag name and value under the given
* subscription. In case of a large number of tags, this operation may return a previously cached
* result.
* @param options The options parameters.
*/
private _list(options?: TagsListOptionalParams): Promise<TagsListResponse> {
return this.client.sendOperationRequest({ options }, listOperationSpec);
}
/**
* This operation allows adding or replacing the entire set of tags on the specified resource or
* subscription. The specified entity can have a maximum of 50 tags.
* @param scope The resource scope.
* @param parameters Wrapper resource for tags API requests and responses.
* @param options The options parameters.
*/
createOrUpdateAtScope(
scope: string,
parameters: TagsResource,
options?: TagsCreateOrUpdateAtScopeOptionalParams
): Promise<TagsCreateOrUpdateAtScopeResponse> {
return this.client.sendOperationRequest(
{ scope, parameters, options },
createOrUpdateAtScopeOperationSpec
);
}
/**
* This operation allows replacing, merging or selectively deleting tags on the specified resource or
* subscription. The specified entity can have a maximum of 50 tags at the end of the operation. The
* 'replace' option replaces the entire set of existing tags with a new set. The 'merge' option allows
* adding tags with new names and updating the values of tags with existing names. The 'delete' option
* allows selectively deleting tags based on given names or name/value pairs.
* @param scope The resource scope.
* @param parameters Wrapper resource for tags patch API request only.
* @param options The options parameters.
*/
updateAtScope(
scope: string,
parameters: TagsPatchResource,
options?: TagsUpdateAtScopeOptionalParams
): Promise<TagsUpdateAtScopeResponse> {
return this.client.sendOperationRequest(
{ scope, parameters, options },
updateAtScopeOperationSpec
);
}
/**
* Gets the entire set of tags on a resource or subscription.
* @param scope The resource scope.
* @param options The options parameters.
*/
getAtScope(
scope: string,
options?: TagsGetAtScopeOptionalParams
): Promise<TagsGetAtScopeResponse> {
return this.client.sendOperationRequest(
{ scope, options },
getAtScopeOperationSpec
);
}
/**
* Deletes the entire set of tags on a resource or subscription.
* @param scope The resource scope.
* @param options The options parameters.
*/
deleteAtScope(
scope: string,
options?: TagsDeleteAtScopeOptionalParams
): Promise<void> {
return this.client.sendOperationRequest(
{ scope, options },
deleteAtScopeOperationSpec
);
}
/**
* ListNext
* @param nextLink The nextLink from the previous successful call to the List method.
* @param options The options parameters.
*/
private _listNext(
nextLink: string,
options?: TagsListNextOptionalParams
): Promise<TagsListNextResponse> {
return this.client.sendOperationRequest(
{ nextLink, options },
listNextOperationSpec
);
}
}
// Operation Specifications
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
const deleteValueOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}",
httpMethod: "DELETE",
responses: {
200: {},
204: {},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.tagName,
Parameters.tagValue
],
headerParameters: [Parameters.accept],
serializer
};
const createOrUpdateValueOperationSpec: coreClient.OperationSpec = {
path:
"/subscriptions/{subscriptionId}/tagNames/{tagName}/tagValues/{tagValue}",
httpMethod: "PUT",
responses: {
200: {
bodyMapper: Mappers.TagValue
},
201: {
bodyMapper: Mappers.TagValue
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.tagName,
Parameters.tagValue
],
headerParameters: [Parameters.accept],
serializer
};
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
path: "/subscriptions/{subscriptionId}/tagNames/{tagName}",
httpMethod: "PUT",
responses: {
200: {
bodyMapper: Mappers.TagDetails
},
201: {
bodyMapper: Mappers.TagDetails
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.tagName
],
headerParameters: [Parameters.accept],
serializer
};
const deleteOperationSpec: coreClient.OperationSpec = {
path: "/subscriptions/{subscriptionId}/tagNames/{tagName}",
httpMethod: "DELETE",
responses: {
200: {},
204: {},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.subscriptionId,
Parameters.tagName
],
headerParameters: [Parameters.accept],
serializer
};
const listOperationSpec: coreClient.OperationSpec = {
path: "/subscriptions/{subscriptionId}/tagNames",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.TagsListResult
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host, Parameters.subscriptionId],
headerParameters: [Parameters.accept],
serializer
};
const createOrUpdateAtScopeOperationSpec: coreClient.OperationSpec = {
path: "/{scope}/providers/Microsoft.Resources/tags/default",
httpMethod: "PUT",
responses: {
200: {
bodyMapper: Mappers.TagsResource
},
default: {
bodyMapper: Mappers.CloudError
}
},
requestBody: Parameters.parameters9,
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host, Parameters.scope],
headerParameters: [Parameters.accept, Parameters.contentType],
mediaType: "json",
serializer
};
const updateAtScopeOperationSpec: coreClient.OperationSpec = {
path: "/{scope}/providers/Microsoft.Resources/tags/default",
httpMethod: "PATCH",
responses: {
200: {
bodyMapper: Mappers.TagsResource
},
default: {
bodyMapper: Mappers.CloudError
}
},
requestBody: Parameters.parameters10,
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host, Parameters.scope],
headerParameters: [Parameters.accept, Parameters.contentType],
mediaType: "json",
serializer
};
const getAtScopeOperationSpec: coreClient.OperationSpec = {
path: "/{scope}/providers/Microsoft.Resources/tags/default",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.TagsResource
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host, Parameters.scope],
headerParameters: [Parameters.accept],
serializer
};
const deleteAtScopeOperationSpec: coreClient.OperationSpec = {
path: "/{scope}/providers/Microsoft.Resources/tags/default",
httpMethod: "DELETE",
responses: {
200: {},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [Parameters.$host, Parameters.scope],
headerParameters: [Parameters.accept],
serializer
};
const listNextOperationSpec: coreClient.OperationSpec = {
path: "{nextLink}",
httpMethod: "GET",
responses: {
200: {
bodyMapper: Mappers.TagsListResult
},
default: {
bodyMapper: Mappers.CloudError
}
},
queryParameters: [Parameters.apiVersion],
urlParameters: [
Parameters.$host,
Parameters.nextLink,
Parameters.subscriptionId
],
headerParameters: [Parameters.accept],
serializer
};
@@ -0,0 +1,144 @@
/*
* 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 { PagedAsyncIterableIterator } from "@azure/core-paging";
import {
DeploymentOperation,
DeploymentOperationsListAtScopeOptionalParams,
DeploymentOperationsListAtTenantScopeOptionalParams,
DeploymentOperationsListAtManagementGroupScopeOptionalParams,
DeploymentOperationsListAtSubscriptionScopeOptionalParams,
DeploymentOperationsListOptionalParams,
DeploymentOperationsGetAtScopeOptionalParams,
DeploymentOperationsGetAtScopeResponse,
DeploymentOperationsGetAtTenantScopeOptionalParams,
DeploymentOperationsGetAtTenantScopeResponse,
DeploymentOperationsGetAtManagementGroupScopeOptionalParams,
DeploymentOperationsGetAtManagementGroupScopeResponse,
DeploymentOperationsGetAtSubscriptionScopeOptionalParams,
DeploymentOperationsGetAtSubscriptionScopeResponse,
DeploymentOperationsGetOptionalParams,
DeploymentOperationsGetResponse
} from "../models";
/// <reference lib="esnext.asynciterable" />
/** Interface representing a DeploymentOperations. */
export interface DeploymentOperations {
/**
* Gets all deployments operations for a deployment.
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
listAtScope(
scope: string,
deploymentName: string,
options?: DeploymentOperationsListAtScopeOptionalParams
): PagedAsyncIterableIterator<DeploymentOperation>;
/**
* Gets all deployments operations for a deployment.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
listAtTenantScope(
deploymentName: string,
options?: DeploymentOperationsListAtTenantScopeOptionalParams
): PagedAsyncIterableIterator<DeploymentOperation>;
/**
* Gets all deployments operations for a deployment.
* @param groupId The management group ID.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
listAtManagementGroupScope(
groupId: string,
deploymentName: string,
options?: DeploymentOperationsListAtManagementGroupScopeOptionalParams
): PagedAsyncIterableIterator<DeploymentOperation>;
/**
* Gets all deployments operations for a deployment.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
listAtSubscriptionScope(
deploymentName: string,
options?: DeploymentOperationsListAtSubscriptionScopeOptionalParams
): PagedAsyncIterableIterator<DeploymentOperation>;
/**
* Gets all deployments operations for a deployment.
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
list(
resourceGroupName: string,
deploymentName: string,
options?: DeploymentOperationsListOptionalParams
): PagedAsyncIterableIterator<DeploymentOperation>;
/**
* Gets a deployments operation.
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param operationId The ID of the operation to get.
* @param options The options parameters.
*/
getAtScope(
scope: string,
deploymentName: string,
operationId: string,
options?: DeploymentOperationsGetAtScopeOptionalParams
): Promise<DeploymentOperationsGetAtScopeResponse>;
/**
* Gets a deployments operation.
* @param deploymentName The name of the deployment.
* @param operationId The ID of the operation to get.
* @param options The options parameters.
*/
getAtTenantScope(
deploymentName: string,
operationId: string,
options?: DeploymentOperationsGetAtTenantScopeOptionalParams
): Promise<DeploymentOperationsGetAtTenantScopeResponse>;
/**
* Gets a deployments operation.
* @param groupId The management group ID.
* @param deploymentName The name of the deployment.
* @param operationId The ID of the operation to get.
* @param options The options parameters.
*/
getAtManagementGroupScope(
groupId: string,
deploymentName: string,
operationId: string,
options?: DeploymentOperationsGetAtManagementGroupScopeOptionalParams
): Promise<DeploymentOperationsGetAtManagementGroupScopeResponse>;
/**
* Gets a deployments operation.
* @param deploymentName The name of the deployment.
* @param operationId The ID of the operation to get.
* @param options The options parameters.
*/
getAtSubscriptionScope(
deploymentName: string,
operationId: string,
options?: DeploymentOperationsGetAtSubscriptionScopeOptionalParams
): Promise<DeploymentOperationsGetAtSubscriptionScopeResponse>;
/**
* Gets a deployments operation.
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param deploymentName The name of the deployment.
* @param operationId The ID of the operation to get.
* @param options The options parameters.
*/
get(
resourceGroupName: string,
deploymentName: string,
operationId: string,
options?: DeploymentOperationsGetOptionalParams
): Promise<DeploymentOperationsGetResponse>;
}
@@ -0,0 +1,959 @@
/*
* 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 { PagedAsyncIterableIterator } from "@azure/core-paging";
import { PollerLike, PollOperationState } from "@azure/core-lro";
import {
DeploymentExtended,
DeploymentsListAtScopeOptionalParams,
DeploymentsListAtTenantScopeOptionalParams,
DeploymentsListAtManagementGroupScopeOptionalParams,
DeploymentsListAtSubscriptionScopeOptionalParams,
DeploymentsListByResourceGroupOptionalParams,
DeploymentsDeleteAtScopeOptionalParams,
DeploymentsCheckExistenceAtScopeOptionalParams,
DeploymentsCheckExistenceAtScopeResponse,
Deployment,
DeploymentsCreateOrUpdateAtScopeOptionalParams,
DeploymentsCreateOrUpdateAtScopeResponse,
DeploymentsGetAtScopeOptionalParams,
DeploymentsGetAtScopeResponse,
DeploymentsCancelAtScopeOptionalParams,
DeploymentsValidateAtScopeOptionalParams,
DeploymentsValidateAtScopeResponse,
DeploymentsExportTemplateAtScopeOptionalParams,
DeploymentsExportTemplateAtScopeResponse,
DeploymentsDeleteAtTenantScopeOptionalParams,
DeploymentsCheckExistenceAtTenantScopeOptionalParams,
DeploymentsCheckExistenceAtTenantScopeResponse,
ScopedDeployment,
DeploymentsCreateOrUpdateAtTenantScopeOptionalParams,
DeploymentsCreateOrUpdateAtTenantScopeResponse,
DeploymentsGetAtTenantScopeOptionalParams,
DeploymentsGetAtTenantScopeResponse,
DeploymentsCancelAtTenantScopeOptionalParams,
DeploymentsValidateAtTenantScopeOptionalParams,
DeploymentsValidateAtTenantScopeResponse,
ScopedDeploymentWhatIf,
DeploymentsWhatIfAtTenantScopeOptionalParams,
DeploymentsWhatIfAtTenantScopeResponse,
DeploymentsExportTemplateAtTenantScopeOptionalParams,
DeploymentsExportTemplateAtTenantScopeResponse,
DeploymentsDeleteAtManagementGroupScopeOptionalParams,
DeploymentsCheckExistenceAtManagementGroupScopeOptionalParams,
DeploymentsCheckExistenceAtManagementGroupScopeResponse,
DeploymentsCreateOrUpdateAtManagementGroupScopeOptionalParams,
DeploymentsCreateOrUpdateAtManagementGroupScopeResponse,
DeploymentsGetAtManagementGroupScopeOptionalParams,
DeploymentsGetAtManagementGroupScopeResponse,
DeploymentsCancelAtManagementGroupScopeOptionalParams,
DeploymentsValidateAtManagementGroupScopeOptionalParams,
DeploymentsValidateAtManagementGroupScopeResponse,
DeploymentsWhatIfAtManagementGroupScopeOptionalParams,
DeploymentsWhatIfAtManagementGroupScopeResponse,
DeploymentsExportTemplateAtManagementGroupScopeOptionalParams,
DeploymentsExportTemplateAtManagementGroupScopeResponse,
DeploymentsDeleteAtSubscriptionScopeOptionalParams,
DeploymentsCheckExistenceAtSubscriptionScopeOptionalParams,
DeploymentsCheckExistenceAtSubscriptionScopeResponse,
DeploymentsCreateOrUpdateAtSubscriptionScopeOptionalParams,
DeploymentsCreateOrUpdateAtSubscriptionScopeResponse,
DeploymentsGetAtSubscriptionScopeOptionalParams,
DeploymentsGetAtSubscriptionScopeResponse,
DeploymentsCancelAtSubscriptionScopeOptionalParams,
DeploymentsValidateAtSubscriptionScopeOptionalParams,
DeploymentsValidateAtSubscriptionScopeResponse,
DeploymentWhatIf,
DeploymentsWhatIfAtSubscriptionScopeOptionalParams,
DeploymentsWhatIfAtSubscriptionScopeResponse,
DeploymentsExportTemplateAtSubscriptionScopeOptionalParams,
DeploymentsExportTemplateAtSubscriptionScopeResponse,
DeploymentsDeleteOptionalParams,
DeploymentsCheckExistenceOptionalParams,
DeploymentsCheckExistenceResponse,
DeploymentsCreateOrUpdateOptionalParams,
DeploymentsCreateOrUpdateResponse,
DeploymentsGetOptionalParams,
DeploymentsGetResponse,
DeploymentsCancelOptionalParams,
DeploymentsValidateOptionalParams,
DeploymentsValidateResponse,
DeploymentsWhatIfOptionalParams,
DeploymentsWhatIfResponse,
DeploymentsExportTemplateOptionalParams,
DeploymentsExportTemplateResponse,
DeploymentsCalculateTemplateHashOptionalParams,
DeploymentsCalculateTemplateHashResponse
} from "../models";
/// <reference lib="esnext.asynciterable" />
/** Interface representing a Deployments. */
export interface Deployments {
/**
* Get all the deployments at the given scope.
* @param scope The resource scope.
* @param options The options parameters.
*/
listAtScope(
scope: string,
options?: DeploymentsListAtScopeOptionalParams
): PagedAsyncIterableIterator<DeploymentExtended>;
/**
* Get all the deployments at the tenant scope.
* @param options The options parameters.
*/
listAtTenantScope(
options?: DeploymentsListAtTenantScopeOptionalParams
): PagedAsyncIterableIterator<DeploymentExtended>;
/**
* Get all the deployments for a management group.
* @param groupId The management group ID.
* @param options The options parameters.
*/
listAtManagementGroupScope(
groupId: string,
options?: DeploymentsListAtManagementGroupScopeOptionalParams
): PagedAsyncIterableIterator<DeploymentExtended>;
/**
* Get all the deployments for a subscription.
* @param options The options parameters.
*/
listAtSubscriptionScope(
options?: DeploymentsListAtSubscriptionScopeOptionalParams
): PagedAsyncIterableIterator<DeploymentExtended>;
/**
* Get all the deployments for a resource group.
* @param resourceGroupName The name of the resource group with the deployments to get. The name is
* case insensitive.
* @param options The options parameters.
*/
listByResourceGroup(
resourceGroupName: string,
options?: DeploymentsListByResourceGroupOptionalParams
): PagedAsyncIterableIterator<DeploymentExtended>;
/**
* A template deployment that is currently running cannot be deleted. Deleting a template deployment
* removes the associated deployment operations. This is an asynchronous operation that returns a
* status of 202 until the template deployment is successfully deleted. The Location response header
* contains the URI that is used to obtain the status of the process. While the process is running, a
* call to the URI in the Location header returns a status of 202. When the process finishes, the URI
* in the Location header returns a status of 204 on success. If the asynchronous request failed, the
* URI in the Location header returns an error-level status code.
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
beginDeleteAtScope(
scope: string,
deploymentName: string,
options?: DeploymentsDeleteAtScopeOptionalParams
): Promise<PollerLike<PollOperationState<void>, void>>;
/**
* A template deployment that is currently running cannot be deleted. Deleting a template deployment
* removes the associated deployment operations. This is an asynchronous operation that returns a
* status of 202 until the template deployment is successfully deleted. The Location response header
* contains the URI that is used to obtain the status of the process. While the process is running, a
* call to the URI in the Location header returns a status of 202. When the process finishes, the URI
* in the Location header returns a status of 204 on success. If the asynchronous request failed, the
* URI in the Location header returns an error-level status code.
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
beginDeleteAtScopeAndWait(
scope: string,
deploymentName: string,
options?: DeploymentsDeleteAtScopeOptionalParams
): Promise<void>;
/**
* Checks whether the deployment exists.
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
checkExistenceAtScope(
scope: string,
deploymentName: string,
options?: DeploymentsCheckExistenceAtScopeOptionalParams
): Promise<DeploymentsCheckExistenceAtScopeResponse>;
/**
* You can provide the template and parameters directly in the request or link to JSON files.
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param parameters Additional parameters supplied to the operation.
* @param options The options parameters.
*/
beginCreateOrUpdateAtScope(
scope: string,
deploymentName: string,
parameters: Deployment,
options?: DeploymentsCreateOrUpdateAtScopeOptionalParams
): Promise<
PollerLike<
PollOperationState<DeploymentsCreateOrUpdateAtScopeResponse>,
DeploymentsCreateOrUpdateAtScopeResponse
>
>;
/**
* You can provide the template and parameters directly in the request or link to JSON files.
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param parameters Additional parameters supplied to the operation.
* @param options The options parameters.
*/
beginCreateOrUpdateAtScopeAndWait(
scope: string,
deploymentName: string,
parameters: Deployment,
options?: DeploymentsCreateOrUpdateAtScopeOptionalParams
): Promise<DeploymentsCreateOrUpdateAtScopeResponse>;
/**
* Gets a deployment.
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
getAtScope(
scope: string,
deploymentName: string,
options?: DeploymentsGetAtScopeOptionalParams
): Promise<DeploymentsGetAtScopeResponse>;
/**
* You can cancel a deployment only if the provisioningState is Accepted or Running. After the
* deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment
* stops the currently running template deployment and leaves the resources partially deployed.
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
cancelAtScope(
scope: string,
deploymentName: string,
options?: DeploymentsCancelAtScopeOptionalParams
): Promise<void>;
/**
* Validates whether the specified template is syntactically correct and will be accepted by Azure
* Resource Manager..
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param parameters Parameters to validate.
* @param options The options parameters.
*/
beginValidateAtScope(
scope: string,
deploymentName: string,
parameters: Deployment,
options?: DeploymentsValidateAtScopeOptionalParams
): Promise<
PollerLike<
PollOperationState<DeploymentsValidateAtScopeResponse>,
DeploymentsValidateAtScopeResponse
>
>;
/**
* Validates whether the specified template is syntactically correct and will be accepted by Azure
* Resource Manager..
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param parameters Parameters to validate.
* @param options The options parameters.
*/
beginValidateAtScopeAndWait(
scope: string,
deploymentName: string,
parameters: Deployment,
options?: DeploymentsValidateAtScopeOptionalParams
): Promise<DeploymentsValidateAtScopeResponse>;
/**
* Exports the template used for specified deployment.
* @param scope The resource scope.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
exportTemplateAtScope(
scope: string,
deploymentName: string,
options?: DeploymentsExportTemplateAtScopeOptionalParams
): Promise<DeploymentsExportTemplateAtScopeResponse>;
/**
* A template deployment that is currently running cannot be deleted. Deleting a template deployment
* removes the associated deployment operations. This is an asynchronous operation that returns a
* status of 202 until the template deployment is successfully deleted. The Location response header
* contains the URI that is used to obtain the status of the process. While the process is running, a
* call to the URI in the Location header returns a status of 202. When the process finishes, the URI
* in the Location header returns a status of 204 on success. If the asynchronous request failed, the
* URI in the Location header returns an error-level status code.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
beginDeleteAtTenantScope(
deploymentName: string,
options?: DeploymentsDeleteAtTenantScopeOptionalParams
): Promise<PollerLike<PollOperationState<void>, void>>;
/**
* A template deployment that is currently running cannot be deleted. Deleting a template deployment
* removes the associated deployment operations. This is an asynchronous operation that returns a
* status of 202 until the template deployment is successfully deleted. The Location response header
* contains the URI that is used to obtain the status of the process. While the process is running, a
* call to the URI in the Location header returns a status of 202. When the process finishes, the URI
* in the Location header returns a status of 204 on success. If the asynchronous request failed, the
* URI in the Location header returns an error-level status code.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
beginDeleteAtTenantScopeAndWait(
deploymentName: string,
options?: DeploymentsDeleteAtTenantScopeOptionalParams
): Promise<void>;
/**
* Checks whether the deployment exists.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
checkExistenceAtTenantScope(
deploymentName: string,
options?: DeploymentsCheckExistenceAtTenantScopeOptionalParams
): Promise<DeploymentsCheckExistenceAtTenantScopeResponse>;
/**
* You can provide the template and parameters directly in the request or link to JSON files.
* @param deploymentName The name of the deployment.
* @param parameters Additional parameters supplied to the operation.
* @param options The options parameters.
*/
beginCreateOrUpdateAtTenantScope(
deploymentName: string,
parameters: ScopedDeployment,
options?: DeploymentsCreateOrUpdateAtTenantScopeOptionalParams
): Promise<
PollerLike<
PollOperationState<DeploymentsCreateOrUpdateAtTenantScopeResponse>,
DeploymentsCreateOrUpdateAtTenantScopeResponse
>
>;
/**
* You can provide the template and parameters directly in the request or link to JSON files.
* @param deploymentName The name of the deployment.
* @param parameters Additional parameters supplied to the operation.
* @param options The options parameters.
*/
beginCreateOrUpdateAtTenantScopeAndWait(
deploymentName: string,
parameters: ScopedDeployment,
options?: DeploymentsCreateOrUpdateAtTenantScopeOptionalParams
): Promise<DeploymentsCreateOrUpdateAtTenantScopeResponse>;
/**
* Gets a deployment.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
getAtTenantScope(
deploymentName: string,
options?: DeploymentsGetAtTenantScopeOptionalParams
): Promise<DeploymentsGetAtTenantScopeResponse>;
/**
* You can cancel a deployment only if the provisioningState is Accepted or Running. After the
* deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment
* stops the currently running template deployment and leaves the resources partially deployed.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
cancelAtTenantScope(
deploymentName: string,
options?: DeploymentsCancelAtTenantScopeOptionalParams
): Promise<void>;
/**
* Validates whether the specified template is syntactically correct and will be accepted by Azure
* Resource Manager..
* @param deploymentName The name of the deployment.
* @param parameters Parameters to validate.
* @param options The options parameters.
*/
beginValidateAtTenantScope(
deploymentName: string,
parameters: ScopedDeployment,
options?: DeploymentsValidateAtTenantScopeOptionalParams
): Promise<
PollerLike<
PollOperationState<DeploymentsValidateAtTenantScopeResponse>,
DeploymentsValidateAtTenantScopeResponse
>
>;
/**
* Validates whether the specified template is syntactically correct and will be accepted by Azure
* Resource Manager..
* @param deploymentName The name of the deployment.
* @param parameters Parameters to validate.
* @param options The options parameters.
*/
beginValidateAtTenantScopeAndWait(
deploymentName: string,
parameters: ScopedDeployment,
options?: DeploymentsValidateAtTenantScopeOptionalParams
): Promise<DeploymentsValidateAtTenantScopeResponse>;
/**
* Returns changes that will be made by the deployment if executed at the scope of the tenant group.
* @param deploymentName The name of the deployment.
* @param parameters Parameters to validate.
* @param options The options parameters.
*/
beginWhatIfAtTenantScope(
deploymentName: string,
parameters: ScopedDeploymentWhatIf,
options?: DeploymentsWhatIfAtTenantScopeOptionalParams
): Promise<
PollerLike<
PollOperationState<DeploymentsWhatIfAtTenantScopeResponse>,
DeploymentsWhatIfAtTenantScopeResponse
>
>;
/**
* Returns changes that will be made by the deployment if executed at the scope of the tenant group.
* @param deploymentName The name of the deployment.
* @param parameters Parameters to validate.
* @param options The options parameters.
*/
beginWhatIfAtTenantScopeAndWait(
deploymentName: string,
parameters: ScopedDeploymentWhatIf,
options?: DeploymentsWhatIfAtTenantScopeOptionalParams
): Promise<DeploymentsWhatIfAtTenantScopeResponse>;
/**
* Exports the template used for specified deployment.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
exportTemplateAtTenantScope(
deploymentName: string,
options?: DeploymentsExportTemplateAtTenantScopeOptionalParams
): Promise<DeploymentsExportTemplateAtTenantScopeResponse>;
/**
* A template deployment that is currently running cannot be deleted. Deleting a template deployment
* removes the associated deployment operations. This is an asynchronous operation that returns a
* status of 202 until the template deployment is successfully deleted. The Location response header
* contains the URI that is used to obtain the status of the process. While the process is running, a
* call to the URI in the Location header returns a status of 202. When the process finishes, the URI
* in the Location header returns a status of 204 on success. If the asynchronous request failed, the
* URI in the Location header returns an error-level status code.
* @param groupId The management group ID.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
beginDeleteAtManagementGroupScope(
groupId: string,
deploymentName: string,
options?: DeploymentsDeleteAtManagementGroupScopeOptionalParams
): Promise<PollerLike<PollOperationState<void>, void>>;
/**
* A template deployment that is currently running cannot be deleted. Deleting a template deployment
* removes the associated deployment operations. This is an asynchronous operation that returns a
* status of 202 until the template deployment is successfully deleted. The Location response header
* contains the URI that is used to obtain the status of the process. While the process is running, a
* call to the URI in the Location header returns a status of 202. When the process finishes, the URI
* in the Location header returns a status of 204 on success. If the asynchronous request failed, the
* URI in the Location header returns an error-level status code.
* @param groupId The management group ID.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
beginDeleteAtManagementGroupScopeAndWait(
groupId: string,
deploymentName: string,
options?: DeploymentsDeleteAtManagementGroupScopeOptionalParams
): Promise<void>;
/**
* Checks whether the deployment exists.
* @param groupId The management group ID.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
checkExistenceAtManagementGroupScope(
groupId: string,
deploymentName: string,
options?: DeploymentsCheckExistenceAtManagementGroupScopeOptionalParams
): Promise<DeploymentsCheckExistenceAtManagementGroupScopeResponse>;
/**
* You can provide the template and parameters directly in the request or link to JSON files.
* @param groupId The management group ID.
* @param deploymentName The name of the deployment.
* @param parameters Additional parameters supplied to the operation.
* @param options The options parameters.
*/
beginCreateOrUpdateAtManagementGroupScope(
groupId: string,
deploymentName: string,
parameters: ScopedDeployment,
options?: DeploymentsCreateOrUpdateAtManagementGroupScopeOptionalParams
): Promise<
PollerLike<
PollOperationState<
DeploymentsCreateOrUpdateAtManagementGroupScopeResponse
>,
DeploymentsCreateOrUpdateAtManagementGroupScopeResponse
>
>;
/**
* You can provide the template and parameters directly in the request or link to JSON files.
* @param groupId The management group ID.
* @param deploymentName The name of the deployment.
* @param parameters Additional parameters supplied to the operation.
* @param options The options parameters.
*/
beginCreateOrUpdateAtManagementGroupScopeAndWait(
groupId: string,
deploymentName: string,
parameters: ScopedDeployment,
options?: DeploymentsCreateOrUpdateAtManagementGroupScopeOptionalParams
): Promise<DeploymentsCreateOrUpdateAtManagementGroupScopeResponse>;
/**
* Gets a deployment.
* @param groupId The management group ID.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
getAtManagementGroupScope(
groupId: string,
deploymentName: string,
options?: DeploymentsGetAtManagementGroupScopeOptionalParams
): Promise<DeploymentsGetAtManagementGroupScopeResponse>;
/**
* You can cancel a deployment only if the provisioningState is Accepted or Running. After the
* deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment
* stops the currently running template deployment and leaves the resources partially deployed.
* @param groupId The management group ID.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
cancelAtManagementGroupScope(
groupId: string,
deploymentName: string,
options?: DeploymentsCancelAtManagementGroupScopeOptionalParams
): Promise<void>;
/**
* Validates whether the specified template is syntactically correct and will be accepted by Azure
* Resource Manager..
* @param groupId The management group ID.
* @param deploymentName The name of the deployment.
* @param parameters Parameters to validate.
* @param options The options parameters.
*/
beginValidateAtManagementGroupScope(
groupId: string,
deploymentName: string,
parameters: ScopedDeployment,
options?: DeploymentsValidateAtManagementGroupScopeOptionalParams
): Promise<
PollerLike<
PollOperationState<DeploymentsValidateAtManagementGroupScopeResponse>,
DeploymentsValidateAtManagementGroupScopeResponse
>
>;
/**
* Validates whether the specified template is syntactically correct and will be accepted by Azure
* Resource Manager..
* @param groupId The management group ID.
* @param deploymentName The name of the deployment.
* @param parameters Parameters to validate.
* @param options The options parameters.
*/
beginValidateAtManagementGroupScopeAndWait(
groupId: string,
deploymentName: string,
parameters: ScopedDeployment,
options?: DeploymentsValidateAtManagementGroupScopeOptionalParams
): Promise<DeploymentsValidateAtManagementGroupScopeResponse>;
/**
* Returns changes that will be made by the deployment if executed at the scope of the management
* group.
* @param groupId The management group ID.
* @param deploymentName The name of the deployment.
* @param parameters Parameters to validate.
* @param options The options parameters.
*/
beginWhatIfAtManagementGroupScope(
groupId: string,
deploymentName: string,
parameters: ScopedDeploymentWhatIf,
options?: DeploymentsWhatIfAtManagementGroupScopeOptionalParams
): Promise<
PollerLike<
PollOperationState<DeploymentsWhatIfAtManagementGroupScopeResponse>,
DeploymentsWhatIfAtManagementGroupScopeResponse
>
>;
/**
* Returns changes that will be made by the deployment if executed at the scope of the management
* group.
* @param groupId The management group ID.
* @param deploymentName The name of the deployment.
* @param parameters Parameters to validate.
* @param options The options parameters.
*/
beginWhatIfAtManagementGroupScopeAndWait(
groupId: string,
deploymentName: string,
parameters: ScopedDeploymentWhatIf,
options?: DeploymentsWhatIfAtManagementGroupScopeOptionalParams
): Promise<DeploymentsWhatIfAtManagementGroupScopeResponse>;
/**
* Exports the template used for specified deployment.
* @param groupId The management group ID.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
exportTemplateAtManagementGroupScope(
groupId: string,
deploymentName: string,
options?: DeploymentsExportTemplateAtManagementGroupScopeOptionalParams
): Promise<DeploymentsExportTemplateAtManagementGroupScopeResponse>;
/**
* A template deployment that is currently running cannot be deleted. Deleting a template deployment
* removes the associated deployment operations. This is an asynchronous operation that returns a
* status of 202 until the template deployment is successfully deleted. The Location response header
* contains the URI that is used to obtain the status of the process. While the process is running, a
* call to the URI in the Location header returns a status of 202. When the process finishes, the URI
* in the Location header returns a status of 204 on success. If the asynchronous request failed, the
* URI in the Location header returns an error-level status code.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
beginDeleteAtSubscriptionScope(
deploymentName: string,
options?: DeploymentsDeleteAtSubscriptionScopeOptionalParams
): Promise<PollerLike<PollOperationState<void>, void>>;
/**
* A template deployment that is currently running cannot be deleted. Deleting a template deployment
* removes the associated deployment operations. This is an asynchronous operation that returns a
* status of 202 until the template deployment is successfully deleted. The Location response header
* contains the URI that is used to obtain the status of the process. While the process is running, a
* call to the URI in the Location header returns a status of 202. When the process finishes, the URI
* in the Location header returns a status of 204 on success. If the asynchronous request failed, the
* URI in the Location header returns an error-level status code.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
beginDeleteAtSubscriptionScopeAndWait(
deploymentName: string,
options?: DeploymentsDeleteAtSubscriptionScopeOptionalParams
): Promise<void>;
/**
* Checks whether the deployment exists.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
checkExistenceAtSubscriptionScope(
deploymentName: string,
options?: DeploymentsCheckExistenceAtSubscriptionScopeOptionalParams
): Promise<DeploymentsCheckExistenceAtSubscriptionScopeResponse>;
/**
* You can provide the template and parameters directly in the request or link to JSON files.
* @param deploymentName The name of the deployment.
* @param parameters Additional parameters supplied to the operation.
* @param options The options parameters.
*/
beginCreateOrUpdateAtSubscriptionScope(
deploymentName: string,
parameters: Deployment,
options?: DeploymentsCreateOrUpdateAtSubscriptionScopeOptionalParams
): Promise<
PollerLike<
PollOperationState<DeploymentsCreateOrUpdateAtSubscriptionScopeResponse>,
DeploymentsCreateOrUpdateAtSubscriptionScopeResponse
>
>;
/**
* You can provide the template and parameters directly in the request or link to JSON files.
* @param deploymentName The name of the deployment.
* @param parameters Additional parameters supplied to the operation.
* @param options The options parameters.
*/
beginCreateOrUpdateAtSubscriptionScopeAndWait(
deploymentName: string,
parameters: Deployment,
options?: DeploymentsCreateOrUpdateAtSubscriptionScopeOptionalParams
): Promise<DeploymentsCreateOrUpdateAtSubscriptionScopeResponse>;
/**
* Gets a deployment.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
getAtSubscriptionScope(
deploymentName: string,
options?: DeploymentsGetAtSubscriptionScopeOptionalParams
): Promise<DeploymentsGetAtSubscriptionScopeResponse>;
/**
* You can cancel a deployment only if the provisioningState is Accepted or Running. After the
* deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment
* stops the currently running template deployment and leaves the resources partially deployed.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
cancelAtSubscriptionScope(
deploymentName: string,
options?: DeploymentsCancelAtSubscriptionScopeOptionalParams
): Promise<void>;
/**
* Validates whether the specified template is syntactically correct and will be accepted by Azure
* Resource Manager..
* @param deploymentName The name of the deployment.
* @param parameters Parameters to validate.
* @param options The options parameters.
*/
beginValidateAtSubscriptionScope(
deploymentName: string,
parameters: Deployment,
options?: DeploymentsValidateAtSubscriptionScopeOptionalParams
): Promise<
PollerLike<
PollOperationState<DeploymentsValidateAtSubscriptionScopeResponse>,
DeploymentsValidateAtSubscriptionScopeResponse
>
>;
/**
* Validates whether the specified template is syntactically correct and will be accepted by Azure
* Resource Manager..
* @param deploymentName The name of the deployment.
* @param parameters Parameters to validate.
* @param options The options parameters.
*/
beginValidateAtSubscriptionScopeAndWait(
deploymentName: string,
parameters: Deployment,
options?: DeploymentsValidateAtSubscriptionScopeOptionalParams
): Promise<DeploymentsValidateAtSubscriptionScopeResponse>;
/**
* Returns changes that will be made by the deployment if executed at the scope of the subscription.
* @param deploymentName The name of the deployment.
* @param parameters Parameters to What If.
* @param options The options parameters.
*/
beginWhatIfAtSubscriptionScope(
deploymentName: string,
parameters: DeploymentWhatIf,
options?: DeploymentsWhatIfAtSubscriptionScopeOptionalParams
): Promise<
PollerLike<
PollOperationState<DeploymentsWhatIfAtSubscriptionScopeResponse>,
DeploymentsWhatIfAtSubscriptionScopeResponse
>
>;
/**
* Returns changes that will be made by the deployment if executed at the scope of the subscription.
* @param deploymentName The name of the deployment.
* @param parameters Parameters to What If.
* @param options The options parameters.
*/
beginWhatIfAtSubscriptionScopeAndWait(
deploymentName: string,
parameters: DeploymentWhatIf,
options?: DeploymentsWhatIfAtSubscriptionScopeOptionalParams
): Promise<DeploymentsWhatIfAtSubscriptionScopeResponse>;
/**
* Exports the template used for specified deployment.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
exportTemplateAtSubscriptionScope(
deploymentName: string,
options?: DeploymentsExportTemplateAtSubscriptionScopeOptionalParams
): Promise<DeploymentsExportTemplateAtSubscriptionScopeResponse>;
/**
* A template deployment that is currently running cannot be deleted. Deleting a template deployment
* removes the associated deployment operations. Deleting a template deployment does not affect the
* state of the resource group. This is an asynchronous operation that returns a status of 202 until
* the template deployment is successfully deleted. The Location response header contains the URI that
* is used to obtain the status of the process. While the process is running, a call to the URI in the
* Location header returns a status of 202. When the process finishes, the URI in the Location header
* returns a status of 204 on success. If the asynchronous request failed, the URI in the Location
* header returns an error-level status code.
* @param resourceGroupName The name of the resource group with the deployment to delete. The name is
* case insensitive.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
beginDelete(
resourceGroupName: string,
deploymentName: string,
options?: DeploymentsDeleteOptionalParams
): Promise<PollerLike<PollOperationState<void>, void>>;
/**
* A template deployment that is currently running cannot be deleted. Deleting a template deployment
* removes the associated deployment operations. Deleting a template deployment does not affect the
* state of the resource group. This is an asynchronous operation that returns a status of 202 until
* the template deployment is successfully deleted. The Location response header contains the URI that
* is used to obtain the status of the process. While the process is running, a call to the URI in the
* Location header returns a status of 202. When the process finishes, the URI in the Location header
* returns a status of 204 on success. If the asynchronous request failed, the URI in the Location
* header returns an error-level status code.
* @param resourceGroupName The name of the resource group with the deployment to delete. The name is
* case insensitive.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
beginDeleteAndWait(
resourceGroupName: string,
deploymentName: string,
options?: DeploymentsDeleteOptionalParams
): Promise<void>;
/**
* Checks whether the deployment exists.
* @param resourceGroupName The name of the resource group with the deployment to check. The name is
* case insensitive.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
checkExistence(
resourceGroupName: string,
deploymentName: string,
options?: DeploymentsCheckExistenceOptionalParams
): Promise<DeploymentsCheckExistenceResponse>;
/**
* You can provide the template and parameters directly in the request or link to JSON files.
* @param resourceGroupName The name of the resource group to deploy the resources to. The name is case
* insensitive. The resource group must already exist.
* @param deploymentName The name of the deployment.
* @param parameters Additional parameters supplied to the operation.
* @param options The options parameters.
*/
beginCreateOrUpdate(
resourceGroupName: string,
deploymentName: string,
parameters: Deployment,
options?: DeploymentsCreateOrUpdateOptionalParams
): Promise<
PollerLike<
PollOperationState<DeploymentsCreateOrUpdateResponse>,
DeploymentsCreateOrUpdateResponse
>
>;
/**
* You can provide the template and parameters directly in the request or link to JSON files.
* @param resourceGroupName The name of the resource group to deploy the resources to. The name is case
* insensitive. The resource group must already exist.
* @param deploymentName The name of the deployment.
* @param parameters Additional parameters supplied to the operation.
* @param options The options parameters.
*/
beginCreateOrUpdateAndWait(
resourceGroupName: string,
deploymentName: string,
parameters: Deployment,
options?: DeploymentsCreateOrUpdateOptionalParams
): Promise<DeploymentsCreateOrUpdateResponse>;
/**
* Gets a deployment.
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
get(
resourceGroupName: string,
deploymentName: string,
options?: DeploymentsGetOptionalParams
): Promise<DeploymentsGetResponse>;
/**
* You can cancel a deployment only if the provisioningState is Accepted or Running. After the
* deployment is canceled, the provisioningState is set to Canceled. Canceling a template deployment
* stops the currently running template deployment and leaves the resource group partially deployed.
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
cancel(
resourceGroupName: string,
deploymentName: string,
options?: DeploymentsCancelOptionalParams
): Promise<void>;
/**
* Validates whether the specified template is syntactically correct and will be accepted by Azure
* Resource Manager..
* @param resourceGroupName The name of the resource group the template will be deployed to. The name
* is case insensitive.
* @param deploymentName The name of the deployment.
* @param parameters Parameters to validate.
* @param options The options parameters.
*/
beginValidate(
resourceGroupName: string,
deploymentName: string,
parameters: Deployment,
options?: DeploymentsValidateOptionalParams
): Promise<
PollerLike<
PollOperationState<DeploymentsValidateResponse>,
DeploymentsValidateResponse
>
>;
/**
* Validates whether the specified template is syntactically correct and will be accepted by Azure
* Resource Manager..
* @param resourceGroupName The name of the resource group the template will be deployed to. The name
* is case insensitive.
* @param deploymentName The name of the deployment.
* @param parameters Parameters to validate.
* @param options The options parameters.
*/
beginValidateAndWait(
resourceGroupName: string,
deploymentName: string,
parameters: Deployment,
options?: DeploymentsValidateOptionalParams
): Promise<DeploymentsValidateResponse>;
/**
* Returns changes that will be made by the deployment if executed at the scope of the resource group.
* @param resourceGroupName The name of the resource group the template will be deployed to. The name
* is case insensitive.
* @param deploymentName The name of the deployment.
* @param parameters Parameters to validate.
* @param options The options parameters.
*/
beginWhatIf(
resourceGroupName: string,
deploymentName: string,
parameters: DeploymentWhatIf,
options?: DeploymentsWhatIfOptionalParams
): Promise<
PollerLike<
PollOperationState<DeploymentsWhatIfResponse>,
DeploymentsWhatIfResponse
>
>;
/**
* Returns changes that will be made by the deployment if executed at the scope of the resource group.
* @param resourceGroupName The name of the resource group the template will be deployed to. The name
* is case insensitive.
* @param deploymentName The name of the deployment.
* @param parameters Parameters to validate.
* @param options The options parameters.
*/
beginWhatIfAndWait(
resourceGroupName: string,
deploymentName: string,
parameters: DeploymentWhatIf,
options?: DeploymentsWhatIfOptionalParams
): Promise<DeploymentsWhatIfResponse>;
/**
* Exports the template used for specified deployment.
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param deploymentName The name of the deployment.
* @param options The options parameters.
*/
exportTemplate(
resourceGroupName: string,
deploymentName: string,
options?: DeploymentsExportTemplateOptionalParams
): Promise<DeploymentsExportTemplateResponse>;
/**
* Calculate the hash of the given template.
* @param template The template provided to calculate hash.
* @param options The options parameters.
*/
calculateTemplateHash(
template: Record<string, unknown>,
options?: DeploymentsCalculateTemplateHashOptionalParams
): Promise<DeploymentsCalculateTemplateHashResponse>;
}
+16
View File
@@ -0,0 +1,16 @@
/*
* 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 "./operations";
export * from "./deployments";
export * from "./providers";
export * from "./providerResourceTypes";
export * from "./resources";
export * from "./resourceGroups";
export * from "./tagsOperations";
export * from "./deploymentOperations";
@@ -0,0 +1,22 @@
/*
* 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 { PagedAsyncIterableIterator } from "@azure/core-paging";
import { Operation, OperationsListOptionalParams } from "../models";
/// <reference lib="esnext.asynciterable" />
/** Interface representing a Operations. */
export interface Operations {
/**
* Lists all of the available Microsoft.Resources REST API operations.
* @param options The options parameters.
*/
list(
options?: OperationsListOptionalParams
): PagedAsyncIterableIterator<Operation>;
}
@@ -0,0 +1,25 @@
/*
* 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 {
ProviderResourceTypesListOptionalParams,
ProviderResourceTypesListResponse
} from "../models";
/** Interface representing a ProviderResourceTypes. */
export interface ProviderResourceTypes {
/**
* List the resource types for a specified resource provider.
* @param resourceProviderNamespace The namespace of the resource provider.
* @param options The options parameters.
*/
list(
resourceProviderNamespace: string,
options?: ProviderResourceTypesListOptionalParams
): Promise<ProviderResourceTypesListResponse>;
}
+100
View File
@@ -0,0 +1,100 @@
/*
* 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 { PagedAsyncIterableIterator } from "@azure/core-paging";
import {
Provider,
ProvidersListOptionalParams,
ProvidersListAtTenantScopeOptionalParams,
ProvidersUnregisterOptionalParams,
ProvidersUnregisterResponse,
ProvidersRegisterAtManagementGroupScopeOptionalParams,
ProvidersProviderPermissionsOptionalParams,
ProvidersProviderPermissionsResponse,
ProvidersRegisterOptionalParams,
ProvidersRegisterResponse,
ProvidersGetOptionalParams,
ProvidersGetResponse,
ProvidersGetAtTenantScopeOptionalParams,
ProvidersGetAtTenantScopeResponse
} from "../models";
/// <reference lib="esnext.asynciterable" />
/** Interface representing a Providers. */
export interface Providers {
/**
* Gets all resource providers for a subscription.
* @param options The options parameters.
*/
list(
options?: ProvidersListOptionalParams
): PagedAsyncIterableIterator<Provider>;
/**
* Gets all resource providers for the tenant.
* @param options The options parameters.
*/
listAtTenantScope(
options?: ProvidersListAtTenantScopeOptionalParams
): PagedAsyncIterableIterator<Provider>;
/**
* Unregisters a subscription from a resource provider.
* @param resourceProviderNamespace The namespace of the resource provider to unregister.
* @param options The options parameters.
*/
unregister(
resourceProviderNamespace: string,
options?: ProvidersUnregisterOptionalParams
): Promise<ProvidersUnregisterResponse>;
/**
* Registers a management group with a resource provider.
* @param resourceProviderNamespace The namespace of the resource provider to register.
* @param groupId The management group ID.
* @param options The options parameters.
*/
registerAtManagementGroupScope(
resourceProviderNamespace: string,
groupId: string,
options?: ProvidersRegisterAtManagementGroupScopeOptionalParams
): Promise<void>;
/**
* Get the provider permissions.
* @param resourceProviderNamespace The namespace of the resource provider.
* @param options The options parameters.
*/
providerPermissions(
resourceProviderNamespace: string,
options?: ProvidersProviderPermissionsOptionalParams
): Promise<ProvidersProviderPermissionsResponse>;
/**
* Registers a subscription with a resource provider.
* @param resourceProviderNamespace The namespace of the resource provider to register.
* @param options The options parameters.
*/
register(
resourceProviderNamespace: string,
options?: ProvidersRegisterOptionalParams
): Promise<ProvidersRegisterResponse>;
/**
* Gets the specified resource provider.
* @param resourceProviderNamespace The namespace of the resource provider.
* @param options The options parameters.
*/
get(
resourceProviderNamespace: string,
options?: ProvidersGetOptionalParams
): Promise<ProvidersGetResponse>;
/**
* Gets the specified resource provider at the tenant level.
* @param resourceProviderNamespace The namespace of the resource provider.
* @param options The options parameters.
*/
getAtTenantScope(
resourceProviderNamespace: string,
options?: ProvidersGetAtTenantScopeOptionalParams
): Promise<ProvidersGetAtTenantScopeResponse>;
}
@@ -0,0 +1,130 @@
/*
* 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 { PagedAsyncIterableIterator } from "@azure/core-paging";
import { PollerLike, PollOperationState } from "@azure/core-lro";
import {
ResourceGroup,
ResourceGroupsListOptionalParams,
ResourceGroupsCheckExistenceOptionalParams,
ResourceGroupsCheckExistenceResponse,
ResourceGroupsCreateOrUpdateOptionalParams,
ResourceGroupsCreateOrUpdateResponse,
ResourceGroupsDeleteOptionalParams,
ResourceGroupsGetOptionalParams,
ResourceGroupsGetResponse,
ResourceGroupPatchable,
ResourceGroupsUpdateOptionalParams,
ResourceGroupsUpdateResponse,
ExportTemplateRequest,
ResourceGroupsExportTemplateOptionalParams,
ResourceGroupsExportTemplateResponse
} from "../models";
/// <reference lib="esnext.asynciterable" />
/** Interface representing a ResourceGroups. */
export interface ResourceGroups {
/**
* Gets all the resource groups for a subscription.
* @param options The options parameters.
*/
list(
options?: ResourceGroupsListOptionalParams
): PagedAsyncIterableIterator<ResourceGroup>;
/**
* Checks whether a resource group exists.
* @param resourceGroupName The name of the resource group to check. The name is case insensitive.
* @param options The options parameters.
*/
checkExistence(
resourceGroupName: string,
options?: ResourceGroupsCheckExistenceOptionalParams
): Promise<ResourceGroupsCheckExistenceResponse>;
/**
* Creates or updates a resource group.
* @param resourceGroupName The name of the resource group to create or update. Can include
* alphanumeric, underscore, parentheses, hyphen, period (except at end), and Unicode characters that
* match the allowed characters.
* @param parameters Parameters supplied to the create or update a resource group.
* @param options The options parameters.
*/
createOrUpdate(
resourceGroupName: string,
parameters: ResourceGroup,
options?: ResourceGroupsCreateOrUpdateOptionalParams
): Promise<ResourceGroupsCreateOrUpdateResponse>;
/**
* When you delete a resource group, all of its resources are also deleted. Deleting a resource group
* deletes all of its template deployments and currently stored operations.
* @param resourceGroupName The name of the resource group to delete. The name is case insensitive.
* @param options The options parameters.
*/
beginDelete(
resourceGroupName: string,
options?: ResourceGroupsDeleteOptionalParams
): Promise<PollerLike<PollOperationState<void>, void>>;
/**
* When you delete a resource group, all of its resources are also deleted. Deleting a resource group
* deletes all of its template deployments and currently stored operations.
* @param resourceGroupName The name of the resource group to delete. The name is case insensitive.
* @param options The options parameters.
*/
beginDeleteAndWait(
resourceGroupName: string,
options?: ResourceGroupsDeleteOptionalParams
): Promise<void>;
/**
* Gets a resource group.
* @param resourceGroupName The name of the resource group to get. The name is case insensitive.
* @param options The options parameters.
*/
get(
resourceGroupName: string,
options?: ResourceGroupsGetOptionalParams
): Promise<ResourceGroupsGetResponse>;
/**
* Resource groups can be updated through a simple PATCH operation to a group address. The format of
* the request is the same as that for creating a resource group. If a field is unspecified, the
* current value is retained.
* @param resourceGroupName The name of the resource group to update. The name is case insensitive.
* @param parameters Parameters supplied to update a resource group.
* @param options The options parameters.
*/
update(
resourceGroupName: string,
parameters: ResourceGroupPatchable,
options?: ResourceGroupsUpdateOptionalParams
): Promise<ResourceGroupsUpdateResponse>;
/**
* Captures the specified resource group as a template.
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param parameters Parameters for exporting the template.
* @param options The options parameters.
*/
beginExportTemplate(
resourceGroupName: string,
parameters: ExportTemplateRequest,
options?: ResourceGroupsExportTemplateOptionalParams
): Promise<
PollerLike<
PollOperationState<ResourceGroupsExportTemplateResponse>,
ResourceGroupsExportTemplateResponse
>
>;
/**
* Captures the specified resource group as a template.
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param parameters Parameters for exporting the template.
* @param options The options parameters.
*/
beginExportTemplateAndWait(
resourceGroupName: string,
parameters: ExportTemplateRequest,
options?: ResourceGroupsExportTemplateOptionalParams
): Promise<ResourceGroupsExportTemplateResponse>;
}
+422
View File
@@ -0,0 +1,422 @@
/*
* 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 { PagedAsyncIterableIterator } from "@azure/core-paging";
import { PollerLike, PollOperationState } from "@azure/core-lro";
import {
GenericResourceExpanded,
ResourcesListByResourceGroupOptionalParams,
ResourcesListOptionalParams,
ResourcesMoveInfo,
ResourcesMoveResourcesOptionalParams,
ResourcesValidateMoveResourcesOptionalParams,
ResourcesCheckExistenceOptionalParams,
ResourcesCheckExistenceResponse,
ResourcesDeleteOptionalParams,
GenericResource,
ResourcesCreateOrUpdateOptionalParams,
ResourcesCreateOrUpdateResponse,
ResourcesUpdateOptionalParams,
ResourcesUpdateResponse,
ResourcesGetOptionalParams,
ResourcesGetResponse,
ResourcesCheckExistenceByIdOptionalParams,
ResourcesCheckExistenceByIdResponse,
ResourcesDeleteByIdOptionalParams,
ResourcesCreateOrUpdateByIdOptionalParams,
ResourcesCreateOrUpdateByIdResponse,
ResourcesUpdateByIdOptionalParams,
ResourcesUpdateByIdResponse,
ResourcesGetByIdOptionalParams,
ResourcesGetByIdResponse
} from "../models";
/// <reference lib="esnext.asynciterable" />
/** Interface representing a Resources. */
export interface Resources {
/**
* Get all the resources for a resource group.
* @param resourceGroupName The resource group with the resources to get.
* @param options The options parameters.
*/
listByResourceGroup(
resourceGroupName: string,
options?: ResourcesListByResourceGroupOptionalParams
): PagedAsyncIterableIterator<GenericResourceExpanded>;
/**
* Get all the resources in a subscription.
* @param options The options parameters.
*/
list(
options?: ResourcesListOptionalParams
): PagedAsyncIterableIterator<GenericResourceExpanded>;
/**
* The resources to be moved must be in the same source resource group in the source subscription being
* used. The target resource group may be in a different subscription. When moving resources, both the
* source group and the target group are locked for the duration of the operation. Write and delete
* operations are blocked on the groups until the move completes.
* @param sourceResourceGroupName The name of the resource group from the source subscription
* containing the resources to be moved.
* @param parameters Parameters for moving resources.
* @param options The options parameters.
*/
beginMoveResources(
sourceResourceGroupName: string,
parameters: ResourcesMoveInfo,
options?: ResourcesMoveResourcesOptionalParams
): Promise<PollerLike<PollOperationState<void>, void>>;
/**
* The resources to be moved must be in the same source resource group in the source subscription being
* used. The target resource group may be in a different subscription. When moving resources, both the
* source group and the target group are locked for the duration of the operation. Write and delete
* operations are blocked on the groups until the move completes.
* @param sourceResourceGroupName The name of the resource group from the source subscription
* containing the resources to be moved.
* @param parameters Parameters for moving resources.
* @param options The options parameters.
*/
beginMoveResourcesAndWait(
sourceResourceGroupName: string,
parameters: ResourcesMoveInfo,
options?: ResourcesMoveResourcesOptionalParams
): Promise<void>;
/**
* This operation checks whether the specified resources can be moved to the target. The resources to
* be moved must be in the same source resource group in the source subscription being used. The target
* resource group may be in a different subscription. If validation succeeds, it returns HTTP response
* code 204 (no content). If validation fails, it returns HTTP response code 409 (Conflict) with an
* error message. Retrieve the URL in the Location header value to check the result of the long-running
* operation.
* @param sourceResourceGroupName The name of the resource group from the source subscription
* containing the resources to be validated for move.
* @param parameters Parameters for moving resources.
* @param options The options parameters.
*/
beginValidateMoveResources(
sourceResourceGroupName: string,
parameters: ResourcesMoveInfo,
options?: ResourcesValidateMoveResourcesOptionalParams
): Promise<PollerLike<PollOperationState<void>, void>>;
/**
* This operation checks whether the specified resources can be moved to the target. The resources to
* be moved must be in the same source resource group in the source subscription being used. The target
* resource group may be in a different subscription. If validation succeeds, it returns HTTP response
* code 204 (no content). If validation fails, it returns HTTP response code 409 (Conflict) with an
* error message. Retrieve the URL in the Location header value to check the result of the long-running
* operation.
* @param sourceResourceGroupName The name of the resource group from the source subscription
* containing the resources to be validated for move.
* @param parameters Parameters for moving resources.
* @param options The options parameters.
*/
beginValidateMoveResourcesAndWait(
sourceResourceGroupName: string,
parameters: ResourcesMoveInfo,
options?: ResourcesValidateMoveResourcesOptionalParams
): Promise<void>;
/**
* Checks whether a resource exists.
* @param resourceGroupName The name of the resource group containing the resource to check. The name
* is case insensitive.
* @param resourceProviderNamespace The resource provider of the resource to check.
* @param parentResourcePath The parent resource identity.
* @param resourceType The resource type.
* @param resourceName The name of the resource to check whether it exists.
* @param apiVersion The API version to use for the operation.
* @param options The options parameters.
*/
checkExistence(
resourceGroupName: string,
resourceProviderNamespace: string,
parentResourcePath: string,
resourceType: string,
resourceName: string,
apiVersion: string,
options?: ResourcesCheckExistenceOptionalParams
): Promise<ResourcesCheckExistenceResponse>;
/**
* Deletes a resource.
* @param resourceGroupName The name of the resource group that contains the resource to delete. The
* name is case insensitive.
* @param resourceProviderNamespace The namespace of the resource provider.
* @param parentResourcePath The parent resource identity.
* @param resourceType The resource type.
* @param resourceName The name of the resource to delete.
* @param apiVersion The API version to use for the operation.
* @param options The options parameters.
*/
beginDelete(
resourceGroupName: string,
resourceProviderNamespace: string,
parentResourcePath: string,
resourceType: string,
resourceName: string,
apiVersion: string,
options?: ResourcesDeleteOptionalParams
): Promise<PollerLike<PollOperationState<void>, void>>;
/**
* Deletes a resource.
* @param resourceGroupName The name of the resource group that contains the resource to delete. The
* name is case insensitive.
* @param resourceProviderNamespace The namespace of the resource provider.
* @param parentResourcePath The parent resource identity.
* @param resourceType The resource type.
* @param resourceName The name of the resource to delete.
* @param apiVersion The API version to use for the operation.
* @param options The options parameters.
*/
beginDeleteAndWait(
resourceGroupName: string,
resourceProviderNamespace: string,
parentResourcePath: string,
resourceType: string,
resourceName: string,
apiVersion: string,
options?: ResourcesDeleteOptionalParams
): Promise<void>;
/**
* Creates a resource.
* @param resourceGroupName The name of the resource group for the resource. The name is case
* insensitive.
* @param resourceProviderNamespace The namespace of the resource provider.
* @param parentResourcePath The parent resource identity.
* @param resourceType The resource type of the resource to create.
* @param resourceName The name of the resource to create.
* @param apiVersion The API version to use for the operation.
* @param parameters Parameters for creating or updating the resource.
* @param options The options parameters.
*/
beginCreateOrUpdate(
resourceGroupName: string,
resourceProviderNamespace: string,
parentResourcePath: string,
resourceType: string,
resourceName: string,
apiVersion: string,
parameters: GenericResource,
options?: ResourcesCreateOrUpdateOptionalParams
): Promise<
PollerLike<
PollOperationState<ResourcesCreateOrUpdateResponse>,
ResourcesCreateOrUpdateResponse
>
>;
/**
* Creates a resource.
* @param resourceGroupName The name of the resource group for the resource. The name is case
* insensitive.
* @param resourceProviderNamespace The namespace of the resource provider.
* @param parentResourcePath The parent resource identity.
* @param resourceType The resource type of the resource to create.
* @param resourceName The name of the resource to create.
* @param apiVersion The API version to use for the operation.
* @param parameters Parameters for creating or updating the resource.
* @param options The options parameters.
*/
beginCreateOrUpdateAndWait(
resourceGroupName: string,
resourceProviderNamespace: string,
parentResourcePath: string,
resourceType: string,
resourceName: string,
apiVersion: string,
parameters: GenericResource,
options?: ResourcesCreateOrUpdateOptionalParams
): Promise<ResourcesCreateOrUpdateResponse>;
/**
* Updates a resource.
* @param resourceGroupName The name of the resource group for the resource. The name is case
* insensitive.
* @param resourceProviderNamespace The namespace of the resource provider.
* @param parentResourcePath The parent resource identity.
* @param resourceType The resource type of the resource to update.
* @param resourceName The name of the resource to update.
* @param apiVersion The API version to use for the operation.
* @param parameters Parameters for updating the resource.
* @param options The options parameters.
*/
beginUpdate(
resourceGroupName: string,
resourceProviderNamespace: string,
parentResourcePath: string,
resourceType: string,
resourceName: string,
apiVersion: string,
parameters: GenericResource,
options?: ResourcesUpdateOptionalParams
): Promise<
PollerLike<
PollOperationState<ResourcesUpdateResponse>,
ResourcesUpdateResponse
>
>;
/**
* Updates a resource.
* @param resourceGroupName The name of the resource group for the resource. The name is case
* insensitive.
* @param resourceProviderNamespace The namespace of the resource provider.
* @param parentResourcePath The parent resource identity.
* @param resourceType The resource type of the resource to update.
* @param resourceName The name of the resource to update.
* @param apiVersion The API version to use for the operation.
* @param parameters Parameters for updating the resource.
* @param options The options parameters.
*/
beginUpdateAndWait(
resourceGroupName: string,
resourceProviderNamespace: string,
parentResourcePath: string,
resourceType: string,
resourceName: string,
apiVersion: string,
parameters: GenericResource,
options?: ResourcesUpdateOptionalParams
): Promise<ResourcesUpdateResponse>;
/**
* Gets a resource.
* @param resourceGroupName The name of the resource group containing the resource to get. The name is
* case insensitive.
* @param resourceProviderNamespace The namespace of the resource provider.
* @param parentResourcePath The parent resource identity.
* @param resourceType The resource type of the resource.
* @param resourceName The name of the resource to get.
* @param apiVersion The API version to use for the operation.
* @param options The options parameters.
*/
get(
resourceGroupName: string,
resourceProviderNamespace: string,
parentResourcePath: string,
resourceType: string,
resourceName: string,
apiVersion: string,
options?: ResourcesGetOptionalParams
): Promise<ResourcesGetResponse>;
/**
* Checks by ID whether a resource exists.
* @param resourceId The fully qualified ID of the resource, including the resource name and resource
* type. Use the format,
* /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
* @param apiVersion The API version to use for the operation.
* @param options The options parameters.
*/
checkExistenceById(
resourceId: string,
apiVersion: string,
options?: ResourcesCheckExistenceByIdOptionalParams
): Promise<ResourcesCheckExistenceByIdResponse>;
/**
* Deletes a resource by ID.
* @param resourceId The fully qualified ID of the resource, including the resource name and resource
* type. Use the format,
* /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
* @param apiVersion The API version to use for the operation.
* @param options The options parameters.
*/
beginDeleteById(
resourceId: string,
apiVersion: string,
options?: ResourcesDeleteByIdOptionalParams
): Promise<PollerLike<PollOperationState<void>, void>>;
/**
* Deletes a resource by ID.
* @param resourceId The fully qualified ID of the resource, including the resource name and resource
* type. Use the format,
* /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
* @param apiVersion The API version to use for the operation.
* @param options The options parameters.
*/
beginDeleteByIdAndWait(
resourceId: string,
apiVersion: string,
options?: ResourcesDeleteByIdOptionalParams
): Promise<void>;
/**
* Create a resource by ID.
* @param resourceId The fully qualified ID of the resource, including the resource name and resource
* type. Use the format,
* /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
* @param apiVersion The API version to use for the operation.
* @param parameters Create or update resource parameters.
* @param options The options parameters.
*/
beginCreateOrUpdateById(
resourceId: string,
apiVersion: string,
parameters: GenericResource,
options?: ResourcesCreateOrUpdateByIdOptionalParams
): Promise<
PollerLike<
PollOperationState<ResourcesCreateOrUpdateByIdResponse>,
ResourcesCreateOrUpdateByIdResponse
>
>;
/**
* Create a resource by ID.
* @param resourceId The fully qualified ID of the resource, including the resource name and resource
* type. Use the format,
* /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
* @param apiVersion The API version to use for the operation.
* @param parameters Create or update resource parameters.
* @param options The options parameters.
*/
beginCreateOrUpdateByIdAndWait(
resourceId: string,
apiVersion: string,
parameters: GenericResource,
options?: ResourcesCreateOrUpdateByIdOptionalParams
): Promise<ResourcesCreateOrUpdateByIdResponse>;
/**
* Updates a resource by ID.
* @param resourceId The fully qualified ID of the resource, including the resource name and resource
* type. Use the format,
* /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
* @param apiVersion The API version to use for the operation.
* @param parameters Update resource parameters.
* @param options The options parameters.
*/
beginUpdateById(
resourceId: string,
apiVersion: string,
parameters: GenericResource,
options?: ResourcesUpdateByIdOptionalParams
): Promise<
PollerLike<
PollOperationState<ResourcesUpdateByIdResponse>,
ResourcesUpdateByIdResponse
>
>;
/**
* Updates a resource by ID.
* @param resourceId The fully qualified ID of the resource, including the resource name and resource
* type. Use the format,
* /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
* @param apiVersion The API version to use for the operation.
* @param parameters Update resource parameters.
* @param options The options parameters.
*/
beginUpdateByIdAndWait(
resourceId: string,
apiVersion: string,
parameters: GenericResource,
options?: ResourcesUpdateByIdOptionalParams
): Promise<ResourcesUpdateByIdResponse>;
/**
* Gets a resource by ID.
* @param resourceId The fully qualified ID of the resource, including the resource name and resource
* type. Use the format,
* /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resource-name}
* @param apiVersion The API version to use for the operation.
* @param options The options parameters.
*/
getById(
resourceId: string,
apiVersion: string,
options?: ResourcesGetByIdOptionalParams
): Promise<ResourcesGetByIdResponse>;
}
@@ -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 { PagedAsyncIterableIterator } from "@azure/core-paging";
import {
TagDetails,
TagsListOptionalParams,
TagsDeleteValueOptionalParams,
TagsCreateOrUpdateValueOptionalParams,
TagsCreateOrUpdateValueResponse,
TagsCreateOrUpdateOptionalParams,
TagsCreateOrUpdateResponse,
TagsDeleteOptionalParams,
TagsResource,
TagsCreateOrUpdateAtScopeOptionalParams,
TagsCreateOrUpdateAtScopeResponse,
TagsPatchResource,
TagsUpdateAtScopeOptionalParams,
TagsUpdateAtScopeResponse,
TagsGetAtScopeOptionalParams,
TagsGetAtScopeResponse,
TagsDeleteAtScopeOptionalParams
} from "../models";
/// <reference lib="esnext.asynciterable" />
/** Interface representing a TagsOperations. */
export interface TagsOperations {
/**
* This operation performs a union of predefined tags, resource tags, resource group tags and
* subscription tags, and returns a summary of usage for each tag name and value under the given
* subscription. In case of a large number of tags, this operation may return a previously cached
* result.
* @param options The options parameters.
*/
list(
options?: TagsListOptionalParams
): PagedAsyncIterableIterator<TagDetails>;
/**
* This operation allows deleting a value from the list of predefined values for an existing predefined
* tag name. The value being deleted must not be in use as a tag value for the given tag name for any
* resource.
* @param tagName The name of the tag.
* @param tagValue The value of the tag to delete.
* @param options The options parameters.
*/
deleteValue(
tagName: string,
tagValue: string,
options?: TagsDeleteValueOptionalParams
): Promise<void>;
/**
* This operation allows adding a value to the list of predefined values for an existing predefined tag
* name. A tag value can have a maximum of 256 characters.
* @param tagName The name of the tag.
* @param tagValue The value of the tag to create.
* @param options The options parameters.
*/
createOrUpdateValue(
tagName: string,
tagValue: string,
options?: TagsCreateOrUpdateValueOptionalParams
): Promise<TagsCreateOrUpdateValueResponse>;
/**
* This operation allows adding a name to the list of predefined tag names for the given subscription.
* A tag name can have a maximum of 512 characters and is case-insensitive. Tag names cannot have the
* following prefixes which are reserved for Azure use: 'microsoft', 'azure', 'windows'.
* @param tagName The name of the tag to create.
* @param options The options parameters.
*/
createOrUpdate(
tagName: string,
options?: TagsCreateOrUpdateOptionalParams
): Promise<TagsCreateOrUpdateResponse>;
/**
* This operation allows deleting a name from the list of predefined tag names for the given
* subscription. The name being deleted must not be in use as a tag name for any resource. All
* predefined values for the given name must have already been deleted.
* @param tagName The name of the tag.
* @param options The options parameters.
*/
delete(tagName: string, options?: TagsDeleteOptionalParams): Promise<void>;
/**
* This operation allows adding or replacing the entire set of tags on the specified resource or
* subscription. The specified entity can have a maximum of 50 tags.
* @param scope The resource scope.
* @param parameters Wrapper resource for tags API requests and responses.
* @param options The options parameters.
*/
createOrUpdateAtScope(
scope: string,
parameters: TagsResource,
options?: TagsCreateOrUpdateAtScopeOptionalParams
): Promise<TagsCreateOrUpdateAtScopeResponse>;
/**
* This operation allows replacing, merging or selectively deleting tags on the specified resource or
* subscription. The specified entity can have a maximum of 50 tags at the end of the operation. The
* 'replace' option replaces the entire set of existing tags with a new set. The 'merge' option allows
* adding tags with new names and updating the values of tags with existing names. The 'delete' option
* allows selectively deleting tags based on given names or name/value pairs.
* @param scope The resource scope.
* @param parameters Wrapper resource for tags patch API request only.
* @param options The options parameters.
*/
updateAtScope(
scope: string,
parameters: TagsPatchResource,
options?: TagsUpdateAtScopeOptionalParams
): Promise<TagsUpdateAtScopeResponse>;
/**
* Gets the entire set of tags on a resource or subscription.
* @param scope The resource scope.
* @param options The options parameters.
*/
getAtScope(
scope: string,
options?: TagsGetAtScopeOptionalParams
): Promise<TagsGetAtScopeResponse>;
/**
* Deletes the entire set of tags on a resource or subscription.
* @param scope The resource scope.
* @param options The options parameters.
*/
deleteAtScope(
scope: string,
options?: TagsDeleteAtScopeOptionalParams
): Promise<void>;
}
+132
View File
@@ -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 * as coreClient from "@azure/core-client";
import * as coreRestPipeline from "@azure/core-rest-pipeline";
import * as coreAuth from "@azure/core-auth";
import {
OperationsImpl,
DeploymentsImpl,
ProvidersImpl,
ProviderResourceTypesImpl,
ResourcesImpl,
ResourceGroupsImpl,
TagsOperationsImpl,
DeploymentOperationsImpl
} from "./operations";
import {
Operations,
Deployments,
Providers,
ProviderResourceTypes,
Resources,
ResourceGroups,
TagsOperations,
DeploymentOperations
} from "./operationsInterfaces";
import { ResourceManagementClientOptionalParams } from "./models";
export class ResourceManagementClient extends coreClient.ServiceClient {
$host: string;
apiVersion: string;
subscriptionId: string;
/**
* Initializes a new instance of the ResourceManagementClient class.
* @param credentials Subscription credentials which uniquely identify client subscription.
* @param subscriptionId The Microsoft Azure subscription ID.
* @param options The parameter options
*/
constructor(
credentials: coreAuth.TokenCredential,
subscriptionId: string,
options?: ResourceManagementClientOptionalParams
) {
if (credentials === undefined) {
throw new Error("'credentials' cannot be null");
}
if (subscriptionId === undefined) {
throw new Error("'subscriptionId' cannot be null");
}
// Initializing default values for options
if (!options) {
options = {};
}
const defaults: ResourceManagementClientOptionalParams = {
requestContentType: "application/json; charset=utf-8",
credential: credentials
};
const packageDetails = `azsdk-js-arm-resources/5.0.1`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
: `${packageDetails}`;
if (!options.credentialScopes) {
options.credentialScopes = ["https://management.azure.com/.default"];
}
const optionsWithDefaults = {
...defaults,
...options,
userAgentOptions: {
userAgentPrefix
},
baseUri:
options.endpoint ?? options.baseUri ?? "https://management.azure.com"
};
super(optionsWithDefaults);
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
(pipelinePolicy) =>
pipelinePolicy.name ===
coreRestPipeline.bearerTokenAuthenticationPolicyName
);
if (!bearerTokenAuthenticationPolicyFound) {
this.pipeline.removePolicy({
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
});
this.pipeline.addPolicy(
coreRestPipeline.bearerTokenAuthenticationPolicy({
scopes: `${optionsWithDefaults.baseUri}/.default`,
challengeCallbacks: {
authorizeRequestOnChallenge:
coreClient.authorizeRequestOnClaimChallenge
}
})
);
}
}
// Parameter assignments
this.subscriptionId = subscriptionId;
// Assigning values to Constant parameters
this.$host = options.$host || "https://management.azure.com";
this.apiVersion = options.apiVersion || "2021-04-01";
this.operations = new OperationsImpl(this);
this.deployments = new DeploymentsImpl(this);
this.providers = new ProvidersImpl(this);
this.providerResourceTypes = new ProviderResourceTypesImpl(this);
this.resources = new ResourcesImpl(this);
this.resourceGroups = new ResourceGroupsImpl(this);
this.tagsOperations = new TagsOperationsImpl(this);
this.deploymentOperations = new DeploymentOperationsImpl(this);
}
operations: Operations;
deployments: Deployments;
providers: Providers;
providerResourceTypes: ProviderResourceTypes;
resources: Resources;
resourceGroups: ResourceGroups;
tagsOperations: TagsOperations;
deploymentOperations: DeploymentOperations;
}