Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ReleasePR @azure/arm-azurestackhci] AzureStackHCI wave4 #12533

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions sdk/azurestackhci/arm-azurestackhci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ npm install @azure/arm-azurestackhci

### 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

Expand All @@ -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 { AzureStackHCIClient, AzureStackHCIModels, AzureStackHCIMappers } from "@azure/arm-azurestackhci";
const msRestNodeAuth = require("@azure/ms-rest-nodeauth");
const { AzureStackHCIClient } = require("@azure/arm-azurestackhci");
const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];

msRestNodeAuth.interactiveLogin().then((creds) => {
Expand Down
4 changes: 2 additions & 2 deletions sdk/azurestackhci/arm-azurestackhci/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -44,7 +43,7 @@ export class AzureStackHCIClientContext extends msRestAzure.AzureServiceClient {

super(credentials, options);

this.apiVersion = '2020-03-01-preview';
this.apiVersion = '2020-10-01';
this.acceptLanguage = 'en-US';
this.longRunningOperationRetryTimeout = 30;
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -15,8 +15,8 @@ export {
ClusterReportedProperties,
ClusterUpdate,
ErrorAdditionalInfo,
ErrorDetail,
ErrorResponse,
ErrorResponseError,
ProxyResource,
Resource,
TrackedResource
Expand Down
40 changes: 21 additions & 19 deletions sdk/azurestackhci/arm-azurestackhci/src/models/index.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -94,11 +94,11 @@ export interface ClusterReportedProperties {
}

/**
* An interface representing Resource.
* Common fields that are returned in the response for all Azure Resource Manager resources
*/
export interface Resource extends BaseResource {
/**
* Fully qualified resource Id for the resource. Ex -
* Fully qualified resource ID for the resource. Ex -
* /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
Expand All @@ -109,15 +109,15 @@ export interface Resource extends BaseResource {
*/
readonly name?: string;
/**
* The type of the resource. Ex- Microsoft.Compute/virtualMachines or
* Microsoft.Storage/storageAccounts.
* The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
* "Microsoft.Storage/storageAccounts"
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly type?: string;
}

/**
* The resource model definition for a ARM tracked top level resource
* The resource model definition for an Azure Resource Manager tracked top level resource
*/
export interface TrackedResource extends Resource {
/**
Expand Down Expand Up @@ -264,14 +264,14 @@ export interface AvailableOperations {
}

/**
* The resource model definition for a ARM proxy resource. It will have everything other than
* required location and tags
* The resource model definition for an Azure Resource Manager proxy resource. It will have
* everything other than required location and tags
*/
export interface ProxyResource extends Resource {
}

/**
* The resource model definition for a Azure Resource Manager resource with an etag.
* The resource model definition for an Azure Resource Manager resource with an etag.
*/
export interface AzureEntityResource extends Resource {
/**
Expand All @@ -298,9 +298,9 @@ export interface ErrorAdditionalInfo {
}

/**
* The error object.
* The error detail.
*/
export interface ErrorResponseError {
export interface ErrorDetail {
/**
* The error code.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
Expand All @@ -320,7 +320,7 @@ export interface ErrorResponseError {
* The error details.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
*/
readonly details?: ErrorResponse[];
readonly details?: ErrorDetail[];
/**
* The error additional info.
* **NOTE: This property will not be serialized. It can only be populated by the server.**
Expand All @@ -329,13 +329,15 @@ export interface ErrorResponseError {
}

/**
* 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 {
/**
* The error object.
*/
error?: ErrorResponseError;
error?: ErrorDetail;
}

/**
Expand Down Expand Up @@ -406,9 +408,9 @@ export type OperationsListResponse = AvailableOperations & {
};

/**
* Contains response data for the list operation.
* Contains response data for the listBySubscription operation.
*/
export type ClustersListResponse = ClusterList & {
export type ClustersListBySubscriptionResponse = ClusterList & {
/**
* The underlying HTTP response.
*/
Expand Down Expand Up @@ -506,9 +508,9 @@ export type ClustersUpdateResponse = Cluster & {
};

/**
* Contains response data for the listNext operation.
* Contains response data for the listBySubscriptionNext operation.
*/
export type ClustersListNextResponse = ClusterList & {
export type ClustersListBySubscriptionNextResponse = ClusterList & {
/**
* The underlying HTTP response.
*/
Expand Down
14 changes: 7 additions & 7 deletions sdk/azurestackhci/arm-azurestackhci/src/models/mappers.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -461,11 +461,11 @@ export const ErrorAdditionalInfo: msRest.CompositeMapper = {
}
};

export const ErrorResponseError: msRest.CompositeMapper = {
serializedName: "ErrorResponse_error",
export const ErrorDetail: msRest.CompositeMapper = {
serializedName: "ErrorDetail",
type: {
name: "Composite",
className: "ErrorResponseError",
className: "ErrorDetail",
modelProperties: {
code: {
readOnly: true,
Expand Down Expand Up @@ -496,7 +496,7 @@ export const ErrorResponseError: msRest.CompositeMapper = {
element: {
type: {
name: "Composite",
className: "ErrorResponse"
className: "ErrorDetail"
}
}
}
Expand Down Expand Up @@ -528,7 +528,7 @@ export const ErrorResponse: msRest.CompositeMapper = {
serializedName: "error",
type: {
name: "Composite",
className: "ErrorResponseError"
className: "ErrorDetail"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -9,8 +9,8 @@
export {
AvailableOperations,
ErrorAdditionalInfo,
ErrorDetail,
ErrorResponse,
ErrorResponseError,
OperationDetail,
OperationDisplay
} from "../models/mappers";
5 changes: 2 additions & 3 deletions sdk/azurestackhci/arm-azurestackhci/src/models/parameters.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down
43 changes: 24 additions & 19 deletions sdk/azurestackhci/arm-azurestackhci/src/operations/clusters.ts
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -29,25 +28,25 @@ export class Clusters {
/**
* List all HCI clusters in a subscription.
* @param [options] The optional parameters
* @returns Promise<Models.ClustersListResponse>
* @returns Promise<Models.ClustersListBySubscriptionResponse>
*/
list(options?: msRest.RequestOptionsBase): Promise<Models.ClustersListResponse>;
listBySubscription(options?: msRest.RequestOptionsBase): Promise<Models.ClustersListBySubscriptionResponse>;
/**
* @param callback The callback
*/
list(callback: msRest.ServiceCallback<Models.ClusterList>): void;
listBySubscription(callback: msRest.ServiceCallback<Models.ClusterList>): void;
/**
* @param options The optional parameters
* @param callback The callback
*/
list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ClusterList>): void;
list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ClusterList>, callback?: msRest.ServiceCallback<Models.ClusterList>): Promise<Models.ClustersListResponse> {
listBySubscription(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ClusterList>): void;
listBySubscription(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ClusterList>, callback?: msRest.ServiceCallback<Models.ClusterList>): Promise<Models.ClustersListBySubscriptionResponse> {
return this.client.sendOperationRequest(
{
options
},
listOperationSpec,
callback) as Promise<Models.ClustersListResponse>;
listBySubscriptionOperationSpec,
callback) as Promise<Models.ClustersListBySubscriptionResponse>;
}

/**
Expand Down Expand Up @@ -214,28 +213,28 @@ export class Clusters {
* List all HCI clusters in a subscription.
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param [options] The optional parameters
* @returns Promise<Models.ClustersListNextResponse>
* @returns Promise<Models.ClustersListBySubscriptionNextResponse>
*/
listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.ClustersListNextResponse>;
listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.ClustersListBySubscriptionNextResponse>;
/**
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param callback The callback
*/
listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.ClusterList>): void;
listBySubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.ClusterList>): void;
/**
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @param options The optional parameters
* @param callback The callback
*/
listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ClusterList>): void;
listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ClusterList>, callback?: msRest.ServiceCallback<Models.ClusterList>): Promise<Models.ClustersListNextResponse> {
listBySubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.ClusterList>): void;
listBySubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.ClusterList>, callback?: msRest.ServiceCallback<Models.ClusterList>): Promise<Models.ClustersListBySubscriptionNextResponse> {
return this.client.sendOperationRequest(
{
nextPageLink,
options
},
listNextOperationSpec,
callback) as Promise<Models.ClustersListNextResponse>;
listBySubscriptionNextOperationSpec,
callback) as Promise<Models.ClustersListBySubscriptionNextResponse>;
}

/**
Expand Down Expand Up @@ -269,7 +268,7 @@ export class Clusters {

// Operation Specifications
const serializer = new msRest.Serializer(Mappers);
const listOperationSpec: msRest.OperationSpec = {
const listBySubscriptionOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
path: "subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/clusters",
urlParameters: [
Expand Down Expand Up @@ -434,13 +433,16 @@ const deleteMethodOperationSpec: msRest.OperationSpec = {
serializer
};

const listNextOperationSpec: msRest.OperationSpec = {
const listBySubscriptionNextOperationSpec: msRest.OperationSpec = {
httpMethod: "GET",
baseUrl: "https://management.azure.com",
path: "{nextLink}",
urlParameters: [
Parameters.nextPageLink
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
Expand All @@ -462,6 +464,9 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = {
urlParameters: [
Parameters.nextPageLink
],
queryParameters: [
Parameters.apiVersion
],
headerParameters: [
Parameters.acceptLanguage
],
Expand Down
Loading