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

[AutoPR @azure/arm-devcenter] Microsoft.DevCenter update OperationStatus model to match arm contract to fix LiveValidation #2371

Closed
wants to merge 1 commit into from
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
12 changes: 6 additions & 6 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 17 additions & 10 deletions sdk/devcenter/arm-devcenter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
# Release History

## 1.0.0-beta.2 (2022-09-30)

**Features**

## 1.0.0-beta.2 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes

- Added operation group ProjectAllowedEnvironmentTypes
- Added Interface AllowedEnvironmentType
- Added Interface AllowedEnvironmentTypeListResult
- Added Interface ProjectAllowedEnvironmentTypesGetOptionalParams
- Added Interface ProjectAllowedEnvironmentTypesListNextOptionalParams
- Added Interface ProjectAllowedEnvironmentTypesListOptionalParams
- Added Type Alias ProjectAllowedEnvironmentTypesGetResponse
- Added Type Alias ProjectAllowedEnvironmentTypesListNextResponse
- Added Type Alias ProjectAllowedEnvironmentTypesListResponse
- Interface OperationStatus has a new optional parameter resourceId
- Class DevCenterClient has a new parameter projectAllowedEnvironmentTypes


## 1.0.0-beta.1 (2022-08-15)

The package of @azure/arm-devcenter is using our next generation design principles. To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart).
2 changes: 1 addition & 1 deletion sdk/devcenter/arm-devcenter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ DevCenter Management API

### Currently supported environments

- [LTS versions of Node.js](https://github.com/nodejs/release#release-schedule)
- [LTS versions of Node.js](https://nodejs.org/about/releases/)
- Latest versions of Safari, Chrome, Edge and Firefox.

See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
Expand Down
8 changes: 4 additions & 4 deletions sdk/devcenter/arm-devcenter/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"commit": "405811c51aa09803caedfe17fd305e110db1ca5e",
"commit": "7d3bcc6f88331e8c5fecdd251dd85d37eb9d8329",
"readme": "specification/devcenter/resource-manager/readme.md",
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\devcenter\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.1.20220721.1 --generate-sample=true",
"autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/devcenter/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.1",
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
"release_tool": "@azure-tools/js-sdk-release-tools@2.4.0",
"use": "@autorest/typescript@6.0.0-rc.1.20220721.1"
"release_tool": "@azure-tools/js-sdk-release-tools@2.4.3",
"use": "@autorest/typescript@6.0.0-rc.1"
}
16 changes: 4 additions & 12 deletions sdk/devcenter/arm-devcenter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
"module": "./dist-esm/src/index.js",
"types": "./types/arm-devcenter.d.ts",
"devDependencies": {
"@microsoft/api-extractor": "^7.31.1",
"@microsoft/api-extractor": "7.18.11",
"@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-multi-entry": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.1.3",
"mkdirp": "^1.0.4",
"rollup": "^2.66.1",
"rollup-plugin-sourcemaps": "^0.6.3",
"typescript": "~4.6.0",
"typescript": "~4.2.0",
"uglify-js": "^3.4.9",
"rimraf": "^3.0.0",
"@azure/identity": "^2.0.1",
Expand Down Expand Up @@ -109,13 +109,5 @@
}
]
},
"autoPublish": true,
"//sampleConfiguration": {
"productName": "",
"productSlugs": [
"azure"
],
"disableDocsMs": true,
"apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-devcenter?view=azure-node-preview"
}
}
"autoPublish": true
}
43 changes: 43 additions & 0 deletions sdk/devcenter/arm-devcenter/review/arm-devcenter.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ import { PollOperationState } from '@azure/core-lro';
// @public
export type ActionType = string;

// @public
export interface AllowedEnvironmentType extends Resource {
readonly provisioningState?: string;
}

// @public
export interface AllowedEnvironmentTypeListResult {
readonly nextLink?: string;
readonly value?: AllowedEnvironmentType[];
}

// @public
export interface AttachedNetworkConnection extends Resource {
readonly domainJoinType?: DomainJoinType;
Expand Down Expand Up @@ -386,6 +397,8 @@ export class DevCenterClient extends coreClient.ServiceClient {
// (undocumented)
pools: Pools;
// (undocumented)
projectAllowedEnvironmentTypes: ProjectAllowedEnvironmentTypes;
// (undocumented)
projectEnvironmentTypes: ProjectEnvironmentTypes;
// (undocumented)
projects: Projects;
Expand Down Expand Up @@ -1112,6 +1125,7 @@ export interface OperationStatus {
readonly name?: string;
readonly percentComplete?: number;
readonly properties?: Record<string, unknown>;
readonly resourceId?: string;
readonly startTime?: Date;
readonly status?: string;
}
Expand Down Expand Up @@ -1239,6 +1253,35 @@ export interface Project extends TrackedResource {
readonly provisioningState?: string;
}

// @public
export interface ProjectAllowedEnvironmentTypes {
get(resourceGroupName: string, projectName: string, environmentTypeName: string, options?: ProjectAllowedEnvironmentTypesGetOptionalParams): Promise<ProjectAllowedEnvironmentTypesGetResponse>;
list(resourceGroupName: string, projectName: string, options?: ProjectAllowedEnvironmentTypesListOptionalParams): PagedAsyncIterableIterator<AllowedEnvironmentType>;
}

// @public
export interface ProjectAllowedEnvironmentTypesGetOptionalParams extends coreClient.OperationOptions {
}

// @public
export type ProjectAllowedEnvironmentTypesGetResponse = AllowedEnvironmentType;

// @public
export interface ProjectAllowedEnvironmentTypesListNextOptionalParams extends coreClient.OperationOptions {
top?: number;
}

// @public
export type ProjectAllowedEnvironmentTypesListNextResponse = AllowedEnvironmentTypeListResult;

// @public
export interface ProjectAllowedEnvironmentTypesListOptionalParams extends coreClient.OperationOptions {
top?: number;
}

// @public
export type ProjectAllowedEnvironmentTypesListResponse = AllowedEnvironmentTypeListResult;

// @public
export interface ProjectEnvironmentType extends Resource {
creatorRoleAssignment?: ProjectEnvironmentTypeUpdatePropertiesCreatorRoleAssignment;
Expand Down
45 changes: 22 additions & 23 deletions sdk/devcenter/arm-devcenter/src/devCenterClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
ImageVersionsImpl,
CatalogsImpl,
EnvironmentTypesImpl,
ProjectAllowedEnvironmentTypesImpl,
ProjectEnvironmentTypesImpl,
DevBoxDefinitionsImpl,
OperationsImpl,
Expand All @@ -42,6 +43,7 @@ import {
ImageVersions,
Catalogs,
EnvironmentTypes,
ProjectAllowedEnvironmentTypes,
ProjectEnvironmentTypes,
DevBoxDefinitions,
Operations,
Expand Down Expand Up @@ -107,41 +109,34 @@ export class DevCenterClient extends coreClient.ServiceClient {
};
super(optionsWithDefaults);

let bearerTokenAuthenticationPolicyFound: boolean = false;
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
(pipelinePolicy) =>
pipelinePolicy.name ===
coreRestPipeline.bearerTokenAuthenticationPolicyName
);
}
if (
!options ||
!options.pipeline ||
options.pipeline.getOrderedPolicies().length == 0 ||
!bearerTokenAuthenticationPolicyFound
) {
this.pipeline.removePolicy({
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
});
this.pipeline.addPolicy(
coreRestPipeline.bearerTokenAuthenticationPolicy({
credential: credentials,
scopes: `${optionsWithDefaults.credentialScopes}`,
challengeCallbacks: {
authorizeRequestOnChallenge:
coreClient.authorizeRequestOnClaimChallenge
}
})
);
if (!bearerTokenAuthenticationPolicyFound) {
this.pipeline.removePolicy({
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
});
this.pipeline.addPolicy(
coreRestPipeline.bearerTokenAuthenticationPolicy({
scopes: `${optionsWithDefaults.baseUri}/.default`,
challengeCallbacks: {
authorizeRequestOnChallenge:
coreClient.authorizeRequestOnClaimChallenge
}
})
);
}
}
// Parameter assignments
this.subscriptionId = subscriptionId;

// Assigning values to Constant parameters
this.$host = options.$host || "https://management.azure.com";
this.apiVersion = options.apiVersion || "2022-08-01-preview";
this.apiVersion = options.apiVersion || "2022-09-01-preview";
this.devCenters = new DevCentersImpl(this);
this.projects = new ProjectsImpl(this);
this.attachedNetworks = new AttachedNetworksImpl(this);
Expand All @@ -150,6 +145,9 @@ export class DevCenterClient extends coreClient.ServiceClient {
this.imageVersions = new ImageVersionsImpl(this);
this.catalogs = new CatalogsImpl(this);
this.environmentTypes = new EnvironmentTypesImpl(this);
this.projectAllowedEnvironmentTypes = new ProjectAllowedEnvironmentTypesImpl(
this
);
this.projectEnvironmentTypes = new ProjectEnvironmentTypesImpl(this);
this.devBoxDefinitions = new DevBoxDefinitionsImpl(this);
this.operations = new OperationsImpl(this);
Expand Down Expand Up @@ -198,6 +196,7 @@ export class DevCenterClient extends coreClient.ServiceClient {
imageVersions: ImageVersions;
catalogs: Catalogs;
environmentTypes: EnvironmentTypes;
projectAllowedEnvironmentTypes: ProjectAllowedEnvironmentTypes;
projectEnvironmentTypes: ProjectEnvironmentTypes;
devBoxDefinitions: DevBoxDefinitions;
operations: Operations;
Expand Down
55 changes: 55 additions & 0 deletions sdk/devcenter/arm-devcenter/src/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,20 @@ export interface EnvironmentTypeUpdate {
tags?: { [propertyName: string]: string };
}

/** Result of the allowed environment type list operation. */
export interface AllowedEnvironmentTypeListResult {
/**
* Current page of results.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly value?: AllowedEnvironmentType[];
/**
* URL to get the next set of results if there are any.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly nextLink?: string;
}

/** Result of the project environment type list operation. */
export interface ProjectEnvironmentTypeListResult {
/**
Expand Down Expand Up @@ -502,6 +516,11 @@ export interface OperationStatus {
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly status?: string;
/**
* The id of the resource.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly resourceId?: string;
/**
* The start time of the operation
* NOTE: This property will not be serialized. It can only be populated by the server.
Expand Down Expand Up @@ -814,6 +833,15 @@ export interface EnvironmentType extends Resource {
readonly provisioningState?: string;
}

/** Represents an allowed environment type. */
export interface AllowedEnvironmentType extends Resource {
/**
* The provisioning state of the resource.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly provisioningState?: string;
}

/** Represents an environment type. */
export interface ProjectEnvironmentType extends Resource {
/** Resource tags. */
Expand Down Expand Up @@ -1935,6 +1963,33 @@ export interface EnvironmentTypesListByDevCenterNextOptionalParams
/** Contains response data for the listByDevCenterNext operation. */
export type EnvironmentTypesListByDevCenterNextResponse = EnvironmentTypeListResult;

/** Optional parameters. */
export interface ProjectAllowedEnvironmentTypesListOptionalParams
extends coreClient.OperationOptions {
/** The maximum number of resources to return from the operation. Example: '$top=10'. */
top?: number;
}

/** Contains response data for the list operation. */
export type ProjectAllowedEnvironmentTypesListResponse = AllowedEnvironmentTypeListResult;

/** Optional parameters. */
export interface ProjectAllowedEnvironmentTypesGetOptionalParams
extends coreClient.OperationOptions {}

/** Contains response data for the get operation. */
export type ProjectAllowedEnvironmentTypesGetResponse = AllowedEnvironmentType;

/** Optional parameters. */
export interface ProjectAllowedEnvironmentTypesListNextOptionalParams
extends coreClient.OperationOptions {
/** The maximum number of resources to return from the operation. Example: '$top=10'. */
top?: number;
}

/** Contains response data for the listNext operation. */
export type ProjectAllowedEnvironmentTypesListNextResponse = AllowedEnvironmentTypeListResult;

/** Optional parameters. */
export interface ProjectEnvironmentTypesListOptionalParams
extends coreClient.OperationOptions {
Expand Down
Loading