diff --git a/sdk/azurestack/arm-azurestack/LICENSE.txt b/sdk/azurestack/arm-azurestack/LICENSE.txt index ea8fb1516028..2d3163745319 100644 --- a/sdk/azurestack/arm-azurestack/LICENSE.txt +++ b/sdk/azurestack/arm-azurestack/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/azurestack/arm-azurestack/README.md b/sdk/azurestack/arm-azurestack/README.md index 65e5624b65d3..dd3416a16576 100644 --- a/sdk/azurestack/arm-azurestack/README.md +++ b/sdk/azurestack/arm-azurestack/README.md @@ -15,7 +15,7 @@ npm install @azure/arm-azurestack ### 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 { AzureStackManagementClient, AzureStackManagementModels, AzureStackManagementMappers } from "@azure/arm-azurestack"; +const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +const { AzureStackManagementClient } = require("@azure/arm-azurestack"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; msRestNodeAuth.interactiveLogin().then((creds) => { diff --git a/sdk/azurestack/arm-azurestack/rollup.config.js b/sdk/azurestack/arm-azurestack/rollup.config.js index 43e870f5a495..28d093ee0c0b 100644 --- a/sdk/azurestack/arm-azurestack/rollup.config.js +++ b/sdk/azurestack/arm-azurestack/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/azurestack/arm-azurestack/src/azureStackManagementClient.ts b/sdk/azurestack/arm-azurestack/src/azureStackManagementClient.ts index 04f21ebf7bfd..ed7893f81c43 100644 --- a/sdk/azurestack/arm-azurestack/src/azureStackManagementClient.ts +++ b/sdk/azurestack/arm-azurestack/src/azureStackManagementClient.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 @@ -18,6 +17,7 @@ import { AzureStackManagementClientContext } from "./azureStackManagementClientC class AzureStackManagementClient extends AzureStackManagementClientContext { // Operation groups operations: operations.Operations; + cloudManifestFile: operations.CloudManifestFile; products: operations.Products; registrations: operations.Registrations; customerSubscriptions: operations.CustomerSubscriptions; @@ -32,6 +32,7 @@ class AzureStackManagementClient extends AzureStackManagementClientContext { constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.AzureStackManagementClientOptions) { super(credentials, subscriptionId, options); this.operations = new operations.Operations(this); + this.cloudManifestFile = new operations.CloudManifestFile(this); this.products = new operations.Products(this); this.registrations = new operations.Registrations(this); this.customerSubscriptions = new operations.CustomerSubscriptions(this); diff --git a/sdk/azurestack/arm-azurestack/src/azureStackManagementClientContext.ts b/sdk/azurestack/arm-azurestack/src/azureStackManagementClientContext.ts index 1af43d53f712..329954c545aa 100644 --- a/sdk/azurestack/arm-azurestack/src/azureStackManagementClientContext.ts +++ b/sdk/azurestack/arm-azurestack/src/azureStackManagementClientContext.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/azurestack/arm-azurestack/src/models/cloudManifestFileMappers.ts b/sdk/azurestack/arm-azurestack/src/models/cloudManifestFileMappers.ts new file mode 100644 index 000000000000..8c940634f123 --- /dev/null +++ b/sdk/azurestack/arm-azurestack/src/models/cloudManifestFileMappers.ts @@ -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. + */ + +export { + BaseResource, + CloudManifestFileDeploymentData, + CloudManifestFileProperties, + CloudManifestFileResponse, + Compatibility, + CustomerSubscription, + ErrorDetails, + ErrorResponse, + IconUris, + Product, + ProductLink, + ProductProperties, + Registration, + Resource, + TrackedResource +} from "../models/mappers"; diff --git a/sdk/azurestack/arm-azurestack/src/models/customerSubscriptionsMappers.ts b/sdk/azurestack/arm-azurestack/src/models/customerSubscriptionsMappers.ts index 3fac26f64b26..a080549ea785 100644 --- a/sdk/azurestack/arm-azurestack/src/models/customerSubscriptionsMappers.ts +++ b/sdk/azurestack/arm-azurestack/src/models/customerSubscriptionsMappers.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. @@ -8,7 +8,9 @@ export { BaseResource, - CloudError, + CloudManifestFileDeploymentData, + CloudManifestFileProperties, + CloudManifestFileResponse, Compatibility, CustomerSubscription, CustomerSubscriptionList, diff --git a/sdk/azurestack/arm-azurestack/src/models/index.ts b/sdk/azurestack/arm-azurestack/src/models/index.ts index bc6c459c0000..65b1ea09d471 100644 --- a/sdk/azurestack/arm-azurestack/src/models/index.ts +++ b/sdk/azurestack/arm-azurestack/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. @@ -107,6 +107,52 @@ export interface Operation { origin?: string; } +/** + * Cloud specific manifest data for AzureStack deployment. + */ +export interface CloudManifestFileDeploymentData { + /** + * Dsms external certificates. + */ + externalDsmsCertificates?: string; + /** + * Signing verification public key. + */ + customCloudVerificationKey?: string; + /** + * ARM endpoint. + */ + customCloudArmEndpoint?: string; + /** + * Dsms endpoint. + */ + externalDsmsEndpoint?: string; +} + +/** + * Cloud specific manifest JSON properties. + */ +export interface CloudManifestFileProperties { + /** + * Cloud specific manifest data. + */ + deploymentData?: CloudManifestFileDeploymentData; + /** + * Signature of the cloud specific manifest data. + */ + signature?: string; +} + +/** + * Cloud specific manifest GET response. + */ +export interface CloudManifestFileResponse extends Resource { + /** + * Cloud specific manifest data. + */ + properties?: CloudManifestFileProperties; +} + /** * The details of the error. */ @@ -588,10 +634,6 @@ export interface RegistrationParameter { * The token identifying registered Azure Stack */ registrationToken: string; - /** - * Location of the resource. Possible values include: 'global' - */ - location?: Location; } /** @@ -604,6 +646,16 @@ export interface CustomerSubscription extends Resource { tenantId?: string; } +/** + * Optional Parameters. + */ +export interface CloudManifestFileGetOptionalParams extends msRest.RequestOptionsBase { + /** + * Signing verification key version creation date. + */ + versionCreationDate?: string; +} + /** * An interface representing AzureStackManagementClientOptions. */ @@ -703,14 +755,6 @@ export type CompatibilityIssue = 'HigherDeviceVersionRequired' | 'LowerDeviceVer */ export type Category = 'AzureAD' | 'ADFS'; -/** - * Defines values for Location. - * Possible values include: 'global' - * @readonly - * @enum {string} - */ -export type Location = 'global'; - /** * Contains response data for the list operation. */ @@ -751,6 +795,46 @@ export type OperationsListNextResponse = OperationList & { }; }; +/** + * Contains response data for the list operation. + */ +export type CloudManifestFileListResponse = CloudManifestFileResponse & { + /** + * 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: CloudManifestFileResponse; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type CloudManifestFileGetResponse = CloudManifestFileResponse & { + /** + * 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: CloudManifestFileResponse; + }; +}; + /** * Contains response data for the list operation. */ diff --git a/sdk/azurestack/arm-azurestack/src/models/mappers.ts b/sdk/azurestack/arm-azurestack/src/models/mappers.ts index 0a241079ca23..275ef44cdc7b 100644 --- a/sdk/azurestack/arm-azurestack/src/models/mappers.ts +++ b/sdk/azurestack/arm-azurestack/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. @@ -169,6 +169,81 @@ export const Operation: msRest.CompositeMapper = { } }; +export const CloudManifestFileDeploymentData: msRest.CompositeMapper = { + serializedName: "CloudManifestFileDeploymentData", + type: { + name: "Composite", + className: "CloudManifestFileDeploymentData", + modelProperties: { + externalDsmsCertificates: { + serializedName: "externalDsmsCertificates", + type: { + name: "String" + } + }, + customCloudVerificationKey: { + serializedName: "customCloudVerificationKey", + type: { + name: "String" + } + }, + customCloudArmEndpoint: { + serializedName: "customEnvironmentEndpoints.customCloudArmEndpoint", + type: { + name: "String" + } + }, + externalDsmsEndpoint: { + serializedName: "customEnvironmentEndpoints.externalDsmsEndpoint", + type: { + name: "String" + } + } + } + } +}; + +export const CloudManifestFileProperties: msRest.CompositeMapper = { + serializedName: "CloudManifestFileProperties", + type: { + name: "Composite", + className: "CloudManifestFileProperties", + modelProperties: { + deploymentData: { + serializedName: "deploymentData", + type: { + name: "Composite", + className: "CloudManifestFileDeploymentData" + } + }, + signature: { + serializedName: "signature", + type: { + name: "String" + } + } + } + } +}; + +export const CloudManifestFileResponse: msRest.CompositeMapper = { + serializedName: "CloudManifestFileResponse", + type: { + name: "Composite", + className: "CloudManifestFileResponse", + modelProperties: { + ...Resource.type.modelProperties, + properties: { + serializedName: "properties", + type: { + name: "Composite", + className: "CloudManifestFileProperties" + } + } + } + } +}; + export const ErrorDetails: msRest.CompositeMapper = { serializedName: "ErrorDetails", type: { @@ -909,7 +984,10 @@ export const RegistrationParameter: msRest.CompositeMapper = { } }, location: { + required: true, + isConstant: true, serializedName: "location", + defaultValue: 'global', type: { name: "String" } diff --git a/sdk/azurestack/arm-azurestack/src/models/operationsMappers.ts b/sdk/azurestack/arm-azurestack/src/models/operationsMappers.ts index a985ca7f4ca9..faa15c414064 100644 --- a/sdk/azurestack/arm-azurestack/src/models/operationsMappers.ts +++ b/sdk/azurestack/arm-azurestack/src/models/operationsMappers.ts @@ -1,14 +1,15 @@ /* - * 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. */ export { - CloudError, Display, + ErrorDetails, + ErrorResponse, Operation, OperationList } from "../models/mappers"; diff --git a/sdk/azurestack/arm-azurestack/src/models/parameters.ts b/sdk/azurestack/arm-azurestack/src/models/parameters.ts index e13086b4e5df..3639bd572137 100644 --- a/sdk/azurestack/arm-azurestack/src/models/parameters.ts +++ b/sdk/azurestack/arm-azurestack/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 @@ -92,3 +91,25 @@ export const subscriptionId: msRest.OperationURLParameter = { } } }; +export const verificationVersion: msRest.OperationURLParameter = { + parameterPath: "verificationVersion", + mapper: { + required: true, + serializedName: "verificationVersion", + type: { + name: "String" + } + } +}; +export const versionCreationDate: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "versionCreationDate" + ], + mapper: { + serializedName: "versionCreationDate", + type: { + name: "String" + } + } +}; diff --git a/sdk/azurestack/arm-azurestack/src/models/productsMappers.ts b/sdk/azurestack/arm-azurestack/src/models/productsMappers.ts index 8690235a808d..76ff7e6944df 100644 --- a/sdk/azurestack/arm-azurestack/src/models/productsMappers.ts +++ b/sdk/azurestack/arm-azurestack/src/models/productsMappers.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. @@ -8,7 +8,9 @@ export { BaseResource, - CloudError, + CloudManifestFileDeploymentData, + CloudManifestFileProperties, + CloudManifestFileResponse, Compatibility, CustomerSubscription, DataDiskImage, diff --git a/sdk/azurestack/arm-azurestack/src/models/registrationsMappers.ts b/sdk/azurestack/arm-azurestack/src/models/registrationsMappers.ts index e9cf05e71ce8..08506c846ca3 100644 --- a/sdk/azurestack/arm-azurestack/src/models/registrationsMappers.ts +++ b/sdk/azurestack/arm-azurestack/src/models/registrationsMappers.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. @@ -9,7 +9,9 @@ export { ActivationKeyResult, BaseResource, - CloudError, + CloudManifestFileDeploymentData, + CloudManifestFileProperties, + CloudManifestFileResponse, Compatibility, CustomerSubscription, ErrorDetails, diff --git a/sdk/azurestack/arm-azurestack/src/operations/cloudManifestFile.ts b/sdk/azurestack/arm-azurestack/src/operations/cloudManifestFile.ts new file mode 100644 index 000000000000..ce41238cc0ad --- /dev/null +++ b/sdk/azurestack/arm-azurestack/src/operations/cloudManifestFile.ts @@ -0,0 +1,125 @@ +/* + * 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/cloudManifestFileMappers"; +import * as Parameters from "../models/parameters"; +import { AzureStackManagementClientContext } from "../azureStackManagementClientContext"; + +/** Class representing a CloudManifestFile. */ +export class CloudManifestFile { + private readonly client: AzureStackManagementClientContext; + + /** + * Create a CloudManifestFile. + * @param {AzureStackManagementClientContext} client Reference to the service client. + */ + constructor(client: AzureStackManagementClientContext) { + this.client = client; + } + + /** + * Returns a cloud specific manifest JSON file with latest version. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Returns a cloud specific manifest JSON file. + * @param verificationVersion Signing verification key version. + * @param [options] The optional parameters + * @returns Promise + */ + get(verificationVersion: string, options?: Models.CloudManifestFileGetOptionalParams): Promise; + /** + * @param verificationVersion Signing verification key version. + * @param callback The callback + */ + get(verificationVersion: string, callback: msRest.ServiceCallback): void; + /** + * @param verificationVersion Signing verification key version. + * @param options The optional parameters + * @param callback The callback + */ + get(verificationVersion: string, options: Models.CloudManifestFileGetOptionalParams, callback: msRest.ServiceCallback): void; + get(verificationVersion: string, options?: Models.CloudManifestFileGetOptionalParams | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + verificationVersion, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.AzureStack/cloudManifestFiles", + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CloudManifestFileResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "providers/Microsoft.AzureStack/cloudManifestFiles/{verificationVersion}", + urlParameters: [ + Parameters.verificationVersion + ], + queryParameters: [ + Parameters.versionCreationDate, + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.CloudManifestFileResponse + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/azurestack/arm-azurestack/src/operations/customerSubscriptions.ts b/sdk/azurestack/arm-azurestack/src/operations/customerSubscriptions.ts index 9435b74b2f6e..eb67a39e6631 100644 --- a/sdk/azurestack/arm-azurestack/src/operations/customerSubscriptions.ts +++ b/sdk/azurestack/arm-azurestack/src/operations/customerSubscriptions.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 @@ -271,7 +270,7 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { 200: {}, 204: {}, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -304,7 +303,7 @@ const createOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.CustomerSubscription }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -317,6 +316,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/azurestack/arm-azurestack/src/operations/index.ts b/sdk/azurestack/arm-azurestack/src/operations/index.ts index 1babd06f2711..807b5d3fbb69 100644 --- a/sdk/azurestack/arm-azurestack/src/operations/index.ts +++ b/sdk/azurestack/arm-azurestack/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 @@ -9,6 +8,7 @@ */ export * from "./operations"; +export * from "./cloudManifestFile"; export * from "./products"; export * from "./registrations"; export * from "./customerSubscriptions"; diff --git a/sdk/azurestack/arm-azurestack/src/operations/operations.ts b/sdk/azurestack/arm-azurestack/src/operations/operations.ts index 197d13211f8e..1bc024f6d15d 100644 --- a/sdk/azurestack/arm-azurestack/src/operations/operations.ts +++ b/sdk/azurestack/arm-azurestack/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 @@ -95,7 +94,7 @@ const listOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.OperationList }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -108,6 +107,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], @@ -116,7 +118,7 @@ const listNextOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.OperationList }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer diff --git a/sdk/azurestack/arm-azurestack/src/operations/products.ts b/sdk/azurestack/arm-azurestack/src/operations/products.ts index 5854a5a2df7d..f54df7455285 100644 --- a/sdk/azurestack/arm-azurestack/src/operations/products.ts +++ b/sdk/azurestack/arm-azurestack/src/operations/products.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 @@ -134,28 +133,32 @@ export class Products { * Returns a list of products. * @param resourceGroup Name of the resource group. * @param registrationName Name of the Azure Stack registration. + * @param productName Name of the product. * @param [options] The optional parameters * @returns Promise */ - getProducts(resourceGroup: string, registrationName: string, options?: msRest.RequestOptionsBase): Promise; + getProducts(resourceGroup: string, registrationName: string, productName: string, options?: msRest.RequestOptionsBase): Promise; /** * @param resourceGroup Name of the resource group. * @param registrationName Name of the Azure Stack registration. + * @param productName Name of the product. * @param callback The callback */ - getProducts(resourceGroup: string, registrationName: string, callback: msRest.ServiceCallback): void; + getProducts(resourceGroup: string, registrationName: string, productName: string, callback: msRest.ServiceCallback): void; /** * @param resourceGroup Name of the resource group. * @param registrationName Name of the Azure Stack registration. + * @param productName Name of the product. * @param options The optional parameters * @param callback The callback */ - getProducts(resourceGroup: string, registrationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getProducts(resourceGroup: string, registrationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + getProducts(resourceGroup: string, registrationName: string, productName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getProducts(resourceGroup: string, registrationName: string, productName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroup, registrationName, + productName, options }, getProductsOperationSpec, @@ -336,7 +339,7 @@ const listDetailsOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ExtendedProduct }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -344,11 +347,12 @@ const listDetailsOperationSpec: msRest.OperationSpec = { const getProductsOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/_all/GetProducts", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/{productName}/getProducts", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroup, - Parameters.registrationName + Parameters.registrationName, + Parameters.productName ], queryParameters: [ Parameters.apiVersion @@ -376,7 +380,7 @@ const getProductsOperationSpec: msRest.OperationSpec = { const getProductOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/{productName}/GetProduct", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/products/{productName}/getProduct", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroup, @@ -447,6 +451,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/azurestack/arm-azurestack/src/operations/registrations.ts b/sdk/azurestack/arm-azurestack/src/operations/registrations.ts index ff7c5d1122a4..1aea52885f5a 100644 --- a/sdk/azurestack/arm-azurestack/src/operations/registrations.ts +++ b/sdk/azurestack/arm-azurestack/src/operations/registrations.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 @@ -222,6 +221,38 @@ export class Registrations { callback) as Promise; } + /** + * Enables remote management for device under the Azure Stack registration. + * @param resourceGroup Name of the resource group. + * @param registrationName Name of the Azure Stack registration. + * @param [options] The optional parameters + * @returns Promise + */ + enableRemoteManagement(resourceGroup: string, registrationName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroup Name of the resource group. + * @param registrationName Name of the Azure Stack registration. + * @param callback The callback + */ + enableRemoteManagement(resourceGroup: string, registrationName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroup Name of the resource group. + * @param registrationName Name of the Azure Stack registration. + * @param options The optional parameters + * @param callback The callback + */ + enableRemoteManagement(resourceGroup: string, registrationName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + enableRemoteManagement(resourceGroup: string, registrationName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroup, + registrationName, + options + }, + enableRemoteManagementOperationSpec, + callback); + } + /** * Returns a list of all registrations. * @param nextPageLink The NextLink from the previous successful call to List operation. @@ -355,7 +386,7 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.Registration }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -412,7 +443,27 @@ const getActivationKeyOperationSpec: msRest.OperationSpec = { bodyMapper: Mappers.ActivationKeyResult }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const enableRemoteManagementOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/registrations/{registrationName}/enableRemoteManagement", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroup, + Parameters.registrationName + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.ErrorResponse } }, serializer @@ -425,6 +476,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion + ], headerParameters: [ Parameters.acceptLanguage ],