From cdfd6fd643df99e25cc6ceeb8f0e565a1951c7e5 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 4 Jan 2021 18:27:40 +0000 Subject: [PATCH] CodeGen from PR 11961 in Azure/azure-rest-api-specs Merge 2915886f827db85059542916b2aed528a28daf64 into b9433e451a68137c738d4a42630a5fe2b7d9b1cb --- sdk/resources/arm-resources/LICENSE.txt | 2 +- sdk/resources/arm-resources/README.md | 9 +- sdk/resources/arm-resources/rollup.config.js | 4 +- .../src/models/deploymentOperationsMappers.ts | 4 +- .../src/models/deploymentsMappers.ts | 6 +- .../arm-resources/src/models/index.ts | 351 +++++++++++++++++- .../arm-resources/src/models/mappers.ts | 107 +++++- .../src/models/operationsMappers.ts | 4 +- .../arm-resources/src/models/parameters.ts | 5 +- .../models/providerResourceTypesMappers.ts | 21 ++ .../src/models/providersMappers.ts | 5 +- .../src/models/resourceGroupsMappers.ts | 5 +- .../src/models/resourcesMappers.ts | 5 +- .../src/models/tagsOperationsMappers.ts | 5 +- .../src/operations/deploymentOperations.ts | 55 ++- .../src/operations/deployments.ts | 60 ++- .../arm-resources/src/operations/index.ts | 6 +- .../src/operations/operations.ts | 8 +- .../src/operations/providerResourceTypes.ts | 82 ++++ .../arm-resources/src/operations/providers.ts | 81 +++- .../src/operations/resourceGroups.ts | 16 +- .../arm-resources/src/operations/resources.ts | 29 +- .../src/operations/tagsOperations.ts | 8 +- .../src/resourceManagementClient.ts | 7 +- .../src/resourceManagementClientContext.ts | 7 +- 25 files changed, 784 insertions(+), 108 deletions(-) create mode 100644 sdk/resources/arm-resources/src/models/providerResourceTypesMappers.ts create mode 100644 sdk/resources/arm-resources/src/operations/providerResourceTypes.ts diff --git a/sdk/resources/arm-resources/LICENSE.txt b/sdk/resources/arm-resources/LICENSE.txt index ea8fb1516028..2d3163745319 100644 --- a/sdk/resources/arm-resources/LICENSE.txt +++ b/sdk/resources/arm-resources/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2020 Microsoft +Copyright (c) 2021 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/resources/arm-resources/README.md b/sdk/resources/arm-resources/README.md index 3db118a758f7..0bf0b6bc32e4 100644 --- a/sdk/resources/arm-resources/README.md +++ b/sdk/resources/arm-resources/README.md @@ -15,7 +15,7 @@ npm install @azure/arm-resources ### How to use -#### nodejs - Authentication, client creation and list operations as an example written in TypeScript. +#### nodejs - client creation and list operations as an example written in TypeScript. ##### Install @azure/ms-rest-nodeauth @@ -26,11 +26,10 @@ npm install @azure/ms-rest-nodeauth@"^3.0.0" ##### Sample code +While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package ```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { ResourceManagementClient, ResourceManagementModels, ResourceManagementMappers } from "@azure/arm-resources"; +const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +const { ResourceManagementClient } = require("@azure/arm-resources"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; msRestNodeAuth.interactiveLogin().then((creds) => { diff --git a/sdk/resources/arm-resources/rollup.config.js b/sdk/resources/arm-resources/rollup.config.js index ffc25a61e75a..9498ddb7ee8e 100644 --- a/sdk/resources/arm-resources/rollup.config.js +++ b/sdk/resources/arm-resources/rollup.config.js @@ -21,8 +21,8 @@ const config = { "@azure/ms-rest-azure-js": "msRestAzure" }, banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * 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. diff --git a/sdk/resources/arm-resources/src/models/deploymentOperationsMappers.ts b/sdk/resources/arm-resources/src/models/deploymentOperationsMappers.ts index 000030dddb55..87a71c90a692 100644 --- a/sdk/resources/arm-resources/src/models/deploymentOperationsMappers.ts +++ b/sdk/resources/arm-resources/src/models/deploymentOperationsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * 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. diff --git a/sdk/resources/arm-resources/src/models/deploymentsMappers.ts b/sdk/resources/arm-resources/src/models/deploymentsMappers.ts index 4676bd4f1d64..12bf546f304d 100644 --- a/sdk/resources/arm-resources/src/models/deploymentsMappers.ts +++ b/sdk/resources/arm-resources/src/models/deploymentsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * 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. @@ -33,6 +33,7 @@ export { DeploymentWhatIfSettings, ErrorAdditionalInfo, ErrorResponse, + ExpressionEvaluationOptions, GenericResource, GenericResourceExpanded, Identity, @@ -42,6 +43,7 @@ export { ParametersLink, Plan, Provider, + ProviderExtendedLocation, ProviderResourceType, Resource, ResourceGroup, diff --git a/sdk/resources/arm-resources/src/models/index.ts b/sdk/resources/arm-resources/src/models/index.ts index ad174de99f5b..c4c60716e30c 100644 --- a/sdk/resources/arm-resources/src/models/index.ts +++ b/sdk/resources/arm-resources/src/models/index.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * 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. @@ -66,14 +66,20 @@ export interface TemplateLink { */ id?: string; /** - * Applicable only if this template link references a Template Spec. This relativePath property - * can optionally be used to reference a Template Spec artifact by path. + * The relativePath property can be used to deploy a linked template at a location relative to + * the parent. If the parent template was linked with a TemplateSpec, this will reference an + * artifact in the TemplateSpec. If the parent was linked with a URI, the child deployment will + * be a combination of the parent and relativePath URIs */ relativePath?: string; /** * If included, must match the ContentVersion in the template. */ contentVersion?: string; + /** + * The query string (for example, a SAS token) to be used with the templateLink URI. + */ + queryString?: string; } /** @@ -120,6 +126,18 @@ export interface OnErrorDeployment { deploymentName?: string; } +/** + * Specifies whether template expressions are evaluated within the scope of the parent template or + * nested template. + */ +export interface ExpressionEvaluationOptions { + /** + * The scope to be used for evaluation of parameters, variables and functions in a nested + * template. Possible values include: 'NotSpecified', 'Outer', 'Inner' + */ + scope?: ExpressionEvaluationOptionsScopeType; +} + /** * Deployment properties. */ @@ -164,6 +182,12 @@ export interface DeploymentProperties { * The deployment on error behavior. */ onErrorDeployment?: OnErrorDeployment; + /** + * Specifies whether template expressions are evaluated within the scope of the parent template + * or nested template. Only applicable to nested templates. If not specified, default value is + * outer. + */ + expressionEvaluationOptions?: ExpressionEvaluationOptions; } /** @@ -278,7 +302,9 @@ export interface ErrorAdditionalInfo { } /** - * The resource management error response. + * Common error response for all Azure Resource Manager APIs to return error details for failed + * operations. (This also follows the OData error response format.) + * @summary Error Response */ export interface ErrorResponse { /** @@ -415,6 +441,24 @@ export interface Alias { readonly defaultMetadata?: AliasPathMetadata; } +/** + * The provider extended location. + */ +export interface ProviderExtendedLocation { + /** + * The azure location. + */ + location?: string; + /** + * The extended location type. + */ + type?: string; + /** + * The extended locations for the azure location. + */ + extendedLocations?: string[]; +} + /** * Resource type managed by the resource provider. */ @@ -427,6 +471,10 @@ export interface ProviderResourceType { * The collection of locations where this resource type can be created. */ locations?: string[]; + /** + * The location mappings that are supported by this resource type. + */ + locationMappings?: ProviderExtendedLocation[]; /** * The aliases that are supported by this resource type. */ @@ -698,6 +746,21 @@ export interface DeploymentExtended extends BaseResource { tags?: { [propertyName: string]: string }; } +/** + * List of resource types of a resource provider. + */ +export interface ProviderResourceTypeListResult { + /** + * An array of resource types. + */ + value?: ProviderResourceType[]; + /** + * The URL to use for getting the next set of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + /** * Plan for the resource. */ @@ -1455,6 +1518,81 @@ export interface DeploymentsListByResourceGroupOptionalParams extends msRest.Req top?: number; } +/** + * Optional Parameters. + */ +export interface DeploymentsListAtScopeNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. For example, you can use $filter=provisioningState eq + * '{state}'. + */ + filter?: string; + /** + * The number of results to get. If null is passed, returns all deployments. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface DeploymentsListAtTenantScopeNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. For example, you can use $filter=provisioningState eq + * '{state}'. + */ + filter?: string; + /** + * The number of results to get. If null is passed, returns all deployments. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface DeploymentsListAtManagementGroupScopeNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. For example, you can use $filter=provisioningState eq + * '{state}'. + */ + filter?: string; + /** + * The number of results to get. If null is passed, returns all deployments. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface DeploymentsListAtSubscriptionScopeNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. For example, you can use $filter=provisioningState eq + * '{state}'. + */ + filter?: string; + /** + * The number of results to get. If null is passed, returns all deployments. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface DeploymentsListByResourceGroupNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation. For example, you can use $filter=provisioningState eq + * '{state}'. + */ + filter?: string; + /** + * The number of results to get. If null is passed, returns all deployments. + */ + top?: number; +} + /** * Optional Parameters. */ @@ -1509,6 +1647,49 @@ export interface ProvidersGetAtTenantScopeOptionalParams extends msRest.RequestO expand?: string; } +/** + * Optional Parameters. + */ +export interface ProvidersListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The number of results to return. If null is passed returns all deployments. + */ + top?: number; + /** + * The properties to include in the results. For example, use &$expand=metadata in the query + * string to retrieve resource provider metadata. To include property aliases in response, use + * $expand=resourceTypes/aliases. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface ProvidersListAtTenantScopeNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The number of results to return. If null is passed returns all providers. + */ + top?: number; + /** + * The properties to include in the results. For example, use &$expand=metadata in the query + * string to retrieve resource provider metadata. To include property aliases in response, use + * $expand=resourceTypes/aliases. + */ + expand?: string; +} + +/** + * Optional Parameters. + */ +export interface ProviderResourceTypesListOptionalParams extends msRest.RequestOptionsBase { + /** + * The $expand query parameter. For example, to include property aliases in response, use + * $expand=resourceTypes/aliases. + */ + expand?: string; +} + /** * Optional Parameters. */ @@ -1575,6 +1756,72 @@ export interface ResourcesListOptionalParams extends msRest.RequestOptionsBase { top?: number; } +/** + * Optional Parameters. + */ +export interface ResourcesListByResourceGroupNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation.

The properties you can use for eq (equals) or ne + * (not equals) are: location, resourceType, name, resourceGroup, identity, identity/principalId, + * plan, plan/publisher, plan/product, plan/name, plan/version, and + * plan/promotionCode.

For example, to filter by a resource type, use: + * $filter=resourceType eq 'Microsoft.Network/virtualNetworks'

You can use + * substringof(value, property) in the filter. The properties you can use for substring are: name + * and resourceGroup.

For example, to get all resources with 'demo' anywhere in the name, + * use: $filter=substringof('demo', name)

You can link more than one substringof together + * by adding and/or operators.

You can filter by tag names and values. For example, to + * filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq 'Value1'. When + * you filter by a tag name and value, the tags for each resource are not returned in the + * results.

You can use some properties together when filtering. The combinations you can + * use are: substringof and/or resourceType, plan and plan/publisher and plan/name, identity and + * identity/principalId. + */ + filter?: string; + /** + * Comma-separated list of additional properties to be included in the response. Valid values + * include `createdTime`, `changedTime` and `provisioningState`. For example, + * `$expand=createdTime,changedTime`. + */ + expand?: string; + /** + * The number of results to return. If null is passed, returns all resources. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface ResourcesListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation.

The properties you can use for eq (equals) or ne + * (not equals) are: location, resourceType, name, resourceGroup, identity, identity/principalId, + * plan, plan/publisher, plan/product, plan/name, plan/version, and + * plan/promotionCode.

For example, to filter by a resource type, use: + * $filter=resourceType eq 'Microsoft.Network/virtualNetworks'

You can use + * substringof(value, property) in the filter. The properties you can use for substring are: name + * and resourceGroup.

For example, to get all resources with 'demo' anywhere in the name, + * use: $filter=substringof('demo', name)

You can link more than one substringof together + * by adding and/or operators.

You can filter by tag names and values. For example, to + * filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq 'Value1'. When + * you filter by a tag name and value, the tags for each resource are not returned in the + * results.

You can use some properties together when filtering. The combinations you can + * use are: substringof and/or resourceType, plan and plan/publisher and plan/name, identity and + * identity/principalId. + */ + filter?: string; + /** + * Comma-separated list of additional properties to be included in the response. Valid values + * include `createdTime`, `changedTime` and `provisioningState`. For example, + * `$expand=createdTime,changedTime`. + */ + expand?: string; + /** + * The number of results to return. If null is passed, returns all resource groups. + */ + top?: number; +} + /** * Optional Parameters. */ @@ -1591,6 +1838,22 @@ export interface ResourceGroupsListOptionalParams extends msRest.RequestOptionsB top?: number; } +/** + * Optional Parameters. + */ +export interface ResourceGroupsListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The filter to apply on the operation.

You can filter by tag names and values. For + * example, to filter for a tag name and value, use $filter=tagName eq 'tag1' and tagValue eq + * 'Value1' + */ + filter?: string; + /** + * The number of results to return. If null is passed, returns all resource groups. + */ + top?: number; +} + /** * Optional Parameters. */ @@ -1641,6 +1904,56 @@ export interface DeploymentOperationsListOptionalParams extends msRest.RequestOp top?: number; } +/** + * Optional Parameters. + */ +export interface DeploymentOperationsListAtScopeNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The number of results to return. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface DeploymentOperationsListAtTenantScopeNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The number of results to return. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface DeploymentOperationsListAtManagementGroupScopeNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The number of results to return. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface DeploymentOperationsListAtSubscriptionScopeNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The number of results to return. + */ + top?: number; +} + +/** + * Optional Parameters. + */ +export interface DeploymentOperationsListNextOptionalParams extends msRest.RequestOptionsBase { + /** + * The number of results to return. + */ + top?: number; +} + /** * An interface representing ResourceManagementClientOptions. */ @@ -1811,6 +2124,14 @@ export type DeploymentMode = 'Incremental' | 'Complete'; */ export type OnErrorDeploymentType = 'LastSuccessful' | 'SpecificDeployment'; +/** + * Defines values for ExpressionEvaluationOptionsScopeType. + * Possible values include: 'NotSpecified', 'Outer', 'Inner' + * @readonly + * @enum {string} + */ +export type ExpressionEvaluationOptionsScopeType = 'NotSpecified' | 'Outer' | 'Inner'; + /** * Defines values for WhatIfResultFormat. * Possible values include: 'ResourceIdOnly', 'FullResourcePayloads' @@ -3149,6 +3470,26 @@ export type ProvidersListAtTenantScopeNextResponse = ProviderListResult & { }; }; +/** + * Contains response data for the list operation. + */ +export type ProviderResourceTypesListResponse = ProviderResourceTypeListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: ProviderResourceTypeListResult; + }; +}; + /** * Contains response data for the listByResourceGroup operation. */ diff --git a/sdk/resources/arm-resources/src/models/mappers.ts b/sdk/resources/arm-resources/src/models/mappers.ts index 6e248695fcca..f0951114fa59 100644 --- a/sdk/resources/arm-resources/src/models/mappers.ts +++ b/sdk/resources/arm-resources/src/models/mappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * 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. @@ -107,6 +107,12 @@ export const TemplateLink: msRest.CompositeMapper = { type: { name: "String" } + }, + queryString: { + serializedName: "queryString", + type: { + name: "String" + } } } } @@ -177,6 +183,22 @@ export const OnErrorDeployment: msRest.CompositeMapper = { } }; +export const ExpressionEvaluationOptions: msRest.CompositeMapper = { + serializedName: "ExpressionEvaluationOptions", + type: { + name: "Composite", + className: "ExpressionEvaluationOptions", + modelProperties: { + scope: { + serializedName: "scope", + type: { + name: "String" + } + } + } + } +}; + export const DeploymentProperties: msRest.CompositeMapper = { serializedName: "DeploymentProperties", type: { @@ -233,6 +255,13 @@ export const DeploymentProperties: msRest.CompositeMapper = { name: "Composite", className: "OnErrorDeployment" } + }, + expressionEvaluationOptions: { + serializedName: "expressionEvaluationOptions", + type: { + name: "Composite", + className: "ExpressionEvaluationOptions" + } } } } @@ -675,6 +704,39 @@ export const Alias: msRest.CompositeMapper = { } }; +export const ProviderExtendedLocation: msRest.CompositeMapper = { + serializedName: "ProviderExtendedLocation", + type: { + name: "Composite", + className: "ProviderExtendedLocation", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + type: { + serializedName: "type", + type: { + name: "String" + } + }, + extendedLocations: { + serializedName: "extendedLocations", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + export const ProviderResourceType: msRest.CompositeMapper = { serializedName: "ProviderResourceType", type: { @@ -698,6 +760,18 @@ export const ProviderResourceType: msRest.CompositeMapper = { } } }, + locationMappings: { + serializedName: "locationMappings", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ProviderExtendedLocation" + } + } + } + }, aliases: { serializedName: "aliases", type: { @@ -1172,6 +1246,35 @@ export const DeploymentExtended: msRest.CompositeMapper = { } }; +export const ProviderResourceTypeListResult: msRest.CompositeMapper = { + serializedName: "ProviderResourceTypeListResult", + type: { + name: "Composite", + className: "ProviderResourceTypeListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ProviderResourceType" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + export const Plan: msRest.CompositeMapper = { serializedName: "Plan", type: { diff --git a/sdk/resources/arm-resources/src/models/operationsMappers.ts b/sdk/resources/arm-resources/src/models/operationsMappers.ts index fb04a88e695f..cdbd10423173 100644 --- a/sdk/resources/arm-resources/src/models/operationsMappers.ts +++ b/sdk/resources/arm-resources/src/models/operationsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * 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. diff --git a/sdk/resources/arm-resources/src/models/parameters.ts b/sdk/resources/arm-resources/src/models/parameters.ts index 50629a1cd649..cb727af091e1 100644 --- a/sdk/resources/arm-resources/src/models/parameters.ts +++ b/sdk/resources/arm-resources/src/models/parameters.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 diff --git a/sdk/resources/arm-resources/src/models/providerResourceTypesMappers.ts b/sdk/resources/arm-resources/src/models/providerResourceTypesMappers.ts new file mode 100644 index 000000000000..79eed67fc80d --- /dev/null +++ b/sdk/resources/arm-resources/src/models/providerResourceTypesMappers.ts @@ -0,0 +1,21 @@ +/* + * 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 { + Alias, + AliasPath, + AliasPathMetadata, + AliasPattern, + ApiProfile, + CloudError, + ErrorAdditionalInfo, + ErrorResponse, + ProviderExtendedLocation, + ProviderResourceType, + ProviderResourceTypeListResult +} from "../models/mappers"; diff --git a/sdk/resources/arm-resources/src/models/providersMappers.ts b/sdk/resources/arm-resources/src/models/providersMappers.ts index cfdd8646e308..b5c3cf524591 100644 --- a/sdk/resources/arm-resources/src/models/providersMappers.ts +++ b/sdk/resources/arm-resources/src/models/providersMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * 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. @@ -16,6 +16,7 @@ export { ErrorAdditionalInfo, ErrorResponse, Provider, + ProviderExtendedLocation, ProviderListResult, ProviderResourceType } from "../models/mappers"; diff --git a/sdk/resources/arm-resources/src/models/resourceGroupsMappers.ts b/sdk/resources/arm-resources/src/models/resourceGroupsMappers.ts index 7bf581d38490..daa811253582 100644 --- a/sdk/resources/arm-resources/src/models/resourceGroupsMappers.ts +++ b/sdk/resources/arm-resources/src/models/resourceGroupsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * 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. @@ -30,6 +30,7 @@ export { ParametersLink, Plan, Provider, + ProviderExtendedLocation, ProviderResourceType, Resource, ResourceGroup, diff --git a/sdk/resources/arm-resources/src/models/resourcesMappers.ts b/sdk/resources/arm-resources/src/models/resourcesMappers.ts index 5cfea66214e4..65e4d18d2868 100644 --- a/sdk/resources/arm-resources/src/models/resourcesMappers.ts +++ b/sdk/resources/arm-resources/src/models/resourcesMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * 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. @@ -29,6 +29,7 @@ export { ParametersLink, Plan, Provider, + ProviderExtendedLocation, ProviderResourceType, Resource, ResourceGroup, diff --git a/sdk/resources/arm-resources/src/models/tagsOperationsMappers.ts b/sdk/resources/arm-resources/src/models/tagsOperationsMappers.ts index 6eea094d94a5..f116657dd156 100644 --- a/sdk/resources/arm-resources/src/models/tagsOperationsMappers.ts +++ b/sdk/resources/arm-resources/src/models/tagsOperationsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * 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. @@ -29,6 +29,7 @@ export { ParametersLink, Plan, Provider, + ProviderExtendedLocation, ProviderResourceType, Resource, ResourceGroup, diff --git a/sdk/resources/arm-resources/src/operations/deploymentOperations.ts b/sdk/resources/arm-resources/src/operations/deploymentOperations.ts index f7c968e55a0b..f262da536ed5 100644 --- a/sdk/resources/arm-resources/src/operations/deploymentOperations.ts +++ b/sdk/resources/arm-resources/src/operations/deploymentOperations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 @@ -356,7 +355,7 @@ export class DeploymentOperations { * @param [options] The optional parameters * @returns Promise */ - listAtScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listAtScopeNext(nextPageLink: string, options?: Models.DeploymentOperationsListAtScopeNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -367,8 +366,8 @@ export class DeploymentOperations { * @param options The optional parameters * @param callback The callback */ - listAtScopeNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listAtScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listAtScopeNext(nextPageLink: string, options: Models.DeploymentOperationsListAtScopeNextOptionalParams, callback: msRest.ServiceCallback): void; + listAtScopeNext(nextPageLink: string, options?: Models.DeploymentOperationsListAtScopeNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -384,7 +383,7 @@ export class DeploymentOperations { * @param [options] The optional parameters * @returns Promise */ - listAtTenantScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listAtTenantScopeNext(nextPageLink: string, options?: Models.DeploymentOperationsListAtTenantScopeNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -395,8 +394,8 @@ export class DeploymentOperations { * @param options The optional parameters * @param callback The callback */ - listAtTenantScopeNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listAtTenantScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listAtTenantScopeNext(nextPageLink: string, options: Models.DeploymentOperationsListAtTenantScopeNextOptionalParams, callback: msRest.ServiceCallback): void; + listAtTenantScopeNext(nextPageLink: string, options?: Models.DeploymentOperationsListAtTenantScopeNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -412,7 +411,7 @@ export class DeploymentOperations { * @param [options] The optional parameters * @returns Promise */ - listAtManagementGroupScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listAtManagementGroupScopeNext(nextPageLink: string, options?: Models.DeploymentOperationsListAtManagementGroupScopeNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -423,8 +422,8 @@ export class DeploymentOperations { * @param options The optional parameters * @param callback The callback */ - listAtManagementGroupScopeNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listAtManagementGroupScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listAtManagementGroupScopeNext(nextPageLink: string, options: Models.DeploymentOperationsListAtManagementGroupScopeNextOptionalParams, callback: msRest.ServiceCallback): void; + listAtManagementGroupScopeNext(nextPageLink: string, options?: Models.DeploymentOperationsListAtManagementGroupScopeNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -440,7 +439,7 @@ export class DeploymentOperations { * @param [options] The optional parameters * @returns Promise */ - listAtSubscriptionScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listAtSubscriptionScopeNext(nextPageLink: string, options?: Models.DeploymentOperationsListAtSubscriptionScopeNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -451,8 +450,8 @@ export class DeploymentOperations { * @param options The optional parameters * @param callback The callback */ - listAtSubscriptionScopeNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listAtSubscriptionScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listAtSubscriptionScopeNext(nextPageLink: string, options: Models.DeploymentOperationsListAtSubscriptionScopeNextOptionalParams, callback: msRest.ServiceCallback): void; + listAtSubscriptionScopeNext(nextPageLink: string, options?: Models.DeploymentOperationsListAtSubscriptionScopeNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -468,7 +467,7 @@ export class DeploymentOperations { * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: Models.DeploymentOperationsListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -479,8 +478,8 @@ export class DeploymentOperations { * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext(nextPageLink: string, options: Models.DeploymentOperationsListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.DeploymentOperationsListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -750,6 +749,10 @@ const listAtScopeNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.top, + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -771,6 +774,10 @@ const listAtTenantScopeNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.top, + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -792,6 +799,10 @@ const listAtManagementGroupScopeNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.top, + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -813,6 +824,10 @@ const listAtSubscriptionScopeNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.top, + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -834,6 +849,10 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.top, + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/resources/arm-resources/src/operations/deployments.ts b/sdk/resources/arm-resources/src/operations/deployments.ts index 6bcb9ee6f7b0..9a05c79ec88e 100644 --- a/sdk/resources/arm-resources/src/operations/deployments.ts +++ b/sdk/resources/arm-resources/src/operations/deployments.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 @@ -1523,7 +1522,7 @@ export class Deployments { * @param [options] The optional parameters * @returns Promise */ - listAtScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listAtScopeNext(nextPageLink: string, options?: Models.DeploymentsListAtScopeNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -1534,8 +1533,8 @@ export class Deployments { * @param options The optional parameters * @param callback The callback */ - listAtScopeNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listAtScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listAtScopeNext(nextPageLink: string, options: Models.DeploymentsListAtScopeNextOptionalParams, callback: msRest.ServiceCallback): void; + listAtScopeNext(nextPageLink: string, options?: Models.DeploymentsListAtScopeNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -1551,7 +1550,7 @@ export class Deployments { * @param [options] The optional parameters * @returns Promise */ - listAtTenantScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listAtTenantScopeNext(nextPageLink: string, options?: Models.DeploymentsListAtTenantScopeNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -1562,8 +1561,8 @@ export class Deployments { * @param options The optional parameters * @param callback The callback */ - listAtTenantScopeNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listAtTenantScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listAtTenantScopeNext(nextPageLink: string, options: Models.DeploymentsListAtTenantScopeNextOptionalParams, callback: msRest.ServiceCallback): void; + listAtTenantScopeNext(nextPageLink: string, options?: Models.DeploymentsListAtTenantScopeNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -1579,7 +1578,7 @@ export class Deployments { * @param [options] The optional parameters * @returns Promise */ - listAtManagementGroupScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listAtManagementGroupScopeNext(nextPageLink: string, options?: Models.DeploymentsListAtManagementGroupScopeNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -1590,8 +1589,8 @@ export class Deployments { * @param options The optional parameters * @param callback The callback */ - listAtManagementGroupScopeNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listAtManagementGroupScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listAtManagementGroupScopeNext(nextPageLink: string, options: Models.DeploymentsListAtManagementGroupScopeNextOptionalParams, callback: msRest.ServiceCallback): void; + listAtManagementGroupScopeNext(nextPageLink: string, options?: Models.DeploymentsListAtManagementGroupScopeNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -1607,7 +1606,7 @@ export class Deployments { * @param [options] The optional parameters * @returns Promise */ - listAtSubscriptionScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listAtSubscriptionScopeNext(nextPageLink: string, options?: Models.DeploymentsListAtSubscriptionScopeNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -1618,8 +1617,8 @@ export class Deployments { * @param options The optional parameters * @param callback The callback */ - listAtSubscriptionScopeNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listAtSubscriptionScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listAtSubscriptionScopeNext(nextPageLink: string, options: Models.DeploymentsListAtSubscriptionScopeNextOptionalParams, callback: msRest.ServiceCallback): void; + listAtSubscriptionScopeNext(nextPageLink: string, options?: Models.DeploymentsListAtSubscriptionScopeNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -1635,7 +1634,7 @@ export class Deployments { * @param [options] The optional parameters * @returns Promise */ - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listByResourceGroupNext(nextPageLink: string, options?: Models.DeploymentsListByResourceGroupNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -1646,8 +1645,8 @@ export class Deployments { * @param options The optional parameters * @param callback The callback */ - listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByResourceGroupNext(nextPageLink: string, options: Models.DeploymentsListByResourceGroupNextOptionalParams, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: Models.DeploymentsListByResourceGroupNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -2889,6 +2888,11 @@ const listAtScopeNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -2910,6 +2914,11 @@ const listAtTenantScopeNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -2931,6 +2940,11 @@ const listAtManagementGroupScopeNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -2952,6 +2966,11 @@ const listAtSubscriptionScopeNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -2973,6 +2992,11 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/resources/arm-resources/src/operations/index.ts b/sdk/resources/arm-resources/src/operations/index.ts index a7cec76246cd..4a1c899f6cb0 100644 --- a/sdk/resources/arm-resources/src/operations/index.ts +++ b/sdk/resources/arm-resources/src/operations/index.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 @@ -11,6 +10,7 @@ export * from "./operations"; export * from "./deployments"; export * from "./providers"; +export * from "./providerResourceTypes"; export * from "./resources"; export * from "./resourceGroups"; export * from "./tagsOperations"; diff --git a/sdk/resources/arm-resources/src/operations/operations.ts b/sdk/resources/arm-resources/src/operations/operations.ts index dafc3946fb7d..ddbd82277168 100644 --- a/sdk/resources/arm-resources/src/operations/operations.ts +++ b/sdk/resources/arm-resources/src/operations/operations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 @@ -108,6 +107,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/resources/arm-resources/src/operations/providerResourceTypes.ts b/sdk/resources/arm-resources/src/operations/providerResourceTypes.ts new file mode 100644 index 000000000000..b2df4d7b90be --- /dev/null +++ b/sdk/resources/arm-resources/src/operations/providerResourceTypes.ts @@ -0,0 +1,82 @@ +/* + * 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 msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/providerResourceTypesMappers"; +import * as Parameters from "../models/parameters"; +import { ResourceManagementClientContext } from "../resourceManagementClientContext"; + +/** Class representing a ProviderResourceTypes. */ +export class ProviderResourceTypes { + private readonly client: ResourceManagementClientContext; + + /** + * Create a ProviderResourceTypes. + * @param {ResourceManagementClientContext} client Reference to the service client. + */ + constructor(client: ResourceManagementClientContext) { + this.client = client; + } + + /** + * List the resource types for a specified resource provider. + * @param resourceProviderNamespace The namespace of the resource provider. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceProviderNamespace: string, options?: Models.ProviderResourceTypesListOptionalParams): Promise; + /** + * @param resourceProviderNamespace The namespace of the resource provider. + * @param callback The callback + */ + list(resourceProviderNamespace: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceProviderNamespace The namespace of the resource provider. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceProviderNamespace: string, options: Models.ProviderResourceTypesListOptionalParams, callback: msRest.ServiceCallback): void; + list(resourceProviderNamespace: string, options?: Models.ProviderResourceTypesListOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceProviderNamespace, + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/resourceTypes", + urlParameters: [ + Parameters.resourceProviderNamespace, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.expand, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ProviderResourceTypeListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/resources/arm-resources/src/operations/providers.ts b/sdk/resources/arm-resources/src/operations/providers.ts index 6af7adc91231..72e4758ad41e 100644 --- a/sdk/resources/arm-resources/src/operations/providers.ts +++ b/sdk/resources/arm-resources/src/operations/providers.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 @@ -54,6 +53,38 @@ export class Providers { callback) as Promise; } + /** + * 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 optional parameters + * @returns Promise + */ + registerAtManagementGroupScope(resourceProviderNamespace: string, groupId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceProviderNamespace The namespace of the resource provider to register. + * @param groupId The management group ID. + * @param callback The callback + */ + registerAtManagementGroupScope(resourceProviderNamespace: string, groupId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceProviderNamespace The namespace of the resource provider to register. + * @param groupId The management group ID. + * @param options The optional parameters + * @param callback The callback + */ + registerAtManagementGroupScope(resourceProviderNamespace: string, groupId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + registerAtManagementGroupScope(resourceProviderNamespace: string, groupId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceProviderNamespace, + groupId, + options + }, + registerAtManagementGroupScopeOperationSpec, + callback); + } + /** * Registers a subscription with a resource provider. * @param resourceProviderNamespace The namespace of the resource provider to register. @@ -192,7 +223,7 @@ export class Providers { * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: Models.ProvidersListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -203,8 +234,8 @@ export class Providers { * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext(nextPageLink: string, options: Models.ProvidersListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.ProvidersListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -220,7 +251,7 @@ export class Providers { * @param [options] The optional parameters * @returns Promise */ - listAtTenantScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listAtTenantScopeNext(nextPageLink: string, options?: Models.ProvidersListAtTenantScopeNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -231,8 +262,8 @@ export class Providers { * @param options The optional parameters * @param callback The callback */ - listAtTenantScopeNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listAtTenantScopeNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listAtTenantScopeNext(nextPageLink: string, options: Models.ProvidersListAtTenantScopeNextOptionalParams, callback: msRest.ServiceCallback): void; + listAtTenantScopeNext(nextPageLink: string, options?: Models.ProvidersListAtTenantScopeNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -269,6 +300,28 @@ const unregisterOperationSpec: msRest.OperationSpec = { serializer }; +const registerAtManagementGroupScopeOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Management/managementGroups/{groupId}/providers/{resourceProviderNamespace}/register", + urlParameters: [ + Parameters.resourceProviderNamespace, + Parameters.groupId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + const registerOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/register", @@ -396,6 +449,11 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.top, + Parameters.expand, + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -417,6 +475,11 @@ const listAtTenantScopeNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.top, + Parameters.expand, + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/resources/arm-resources/src/operations/resourceGroups.ts b/sdk/resources/arm-resources/src/operations/resourceGroups.ts index 617190a57bc6..2142867b6d1a 100644 --- a/sdk/resources/arm-resources/src/operations/resourceGroups.ts +++ b/sdk/resources/arm-resources/src/operations/resourceGroups.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 @@ -247,7 +246,7 @@ export class ResourceGroups { * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: Models.ResourceGroupsListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -258,8 +257,8 @@ export class ResourceGroups { * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext(nextPageLink: string, options: Models.ResourceGroupsListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.ResourceGroupsListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -471,6 +470,11 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.filter, + Parameters.top, + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/resources/arm-resources/src/operations/resources.ts b/sdk/resources/arm-resources/src/operations/resources.ts index be81c76eeb7b..c500273226df 100644 --- a/sdk/resources/arm-resources/src/operations/resources.ts +++ b/sdk/resources/arm-resources/src/operations/resources.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 @@ -591,7 +590,7 @@ export class Resources { * @param [options] The optional parameters * @returns Promise */ - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listByResourceGroupNext(nextPageLink: string, options?: Models.ResourcesListByResourceGroupNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -602,8 +601,8 @@ export class Resources { * @param options The optional parameters * @param callback The callback */ - listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listByResourceGroupNext(nextPageLink: string, options: Models.ResourcesListByResourceGroupNextOptionalParams, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: Models.ResourcesListByResourceGroupNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -619,7 +618,7 @@ export class Resources { * @param [options] The optional parameters * @returns Promise */ - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + listNext(nextPageLink: string, options?: Models.ResourcesListNextOptionalParams): Promise; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback @@ -630,8 +629,8 @@ export class Resources { * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext(nextPageLink: string, options: Models.ResourcesListNextOptionalParams, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: Models.ResourcesListNextOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -1055,6 +1054,12 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.filter, + Parameters.expand, + Parameters.top, + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -1076,6 +1081,12 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.filter, + Parameters.expand, + Parameters.top, + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/resources/arm-resources/src/operations/tagsOperations.ts b/sdk/resources/arm-resources/src/operations/tagsOperations.ts index 74aec7cd47e6..dcdc9e81a008 100644 --- a/sdk/resources/arm-resources/src/operations/tagsOperations.ts +++ b/sdk/resources/arm-resources/src/operations/tagsOperations.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 @@ -584,6 +583,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/resources/arm-resources/src/resourceManagementClient.ts b/sdk/resources/arm-resources/src/resourceManagementClient.ts index 535cd08e4b20..23ff48ea4bc9 100644 --- a/sdk/resources/arm-resources/src/resourceManagementClient.ts +++ b/sdk/resources/arm-resources/src/resourceManagementClient.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 @@ -20,6 +19,7 @@ class ResourceManagementClient extends ResourceManagementClientContext { operations: operations.Operations; deployments: operations.Deployments; providers: operations.Providers; + providerResourceTypes: operations.ProviderResourceTypes; resources: operations.Resources; resourceGroups: operations.ResourceGroups; tags: operations.TagsOperations; @@ -36,6 +36,7 @@ class ResourceManagementClient extends ResourceManagementClientContext { this.operations = new operations.Operations(this); this.deployments = new operations.Deployments(this); this.providers = new operations.Providers(this); + this.providerResourceTypes = new operations.ProviderResourceTypes(this); this.resources = new operations.Resources(this); this.resourceGroups = new operations.ResourceGroups(this); this.tags = new operations.TagsOperations(this); diff --git a/sdk/resources/arm-resources/src/resourceManagementClientContext.ts b/sdk/resources/arm-resources/src/resourceManagementClientContext.ts index 59eca61ef909..5195ec027100 100644 --- a/sdk/resources/arm-resources/src/resourceManagementClientContext.ts +++ b/sdk/resources/arm-resources/src/resourceManagementClientContext.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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 @@ -44,7 +43,7 @@ export class ResourceManagementClientContext extends msRestAzure.AzureServiceCli super(credentials, options); - this.apiVersion = '2020-06-01'; + this.apiVersion = '2020-10-01'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";