support rename for login, user and a few other types (#22331)

* rename object

* add comment

* use URN property

* vbump STS

* revert loc string change

* fix name check

* pr comments
This commit is contained in:
Alan Ren
2023-03-16 15:00:07 -07:00
committed by GitHub
parent f5628ed8e3
commit 20cf2489a2
12 changed files with 164 additions and 10 deletions

View File

@@ -136,6 +136,16 @@ export class ObjectManagementService implements IObjectManagementService {
}
);
}
rename(connectionUri: string, objectUrn: string, newName: string): Thenable<void> {
const params: contracts.RenameObjectRequestParams = { connectionUri, objectUrn, newName };
return this.client.sendRequest(contracts.RenameObjectRequest.type, params).then(
r => { },
e => {
this.client.logFailedRequest(contracts.RenameObjectRequest.type, e);
return Promise.reject(new Error(e.message));
}
);
}
}
export class TestObjectManagementService implements IObjectManagementService {
@@ -292,6 +302,9 @@ export class TestObjectManagementService implements IObjectManagementService {
}
async disposeUserView(contextId: string): Promise<void> {
}
async rename(connectionUri: string, objectUrn: string, newName: string): Promise<void> {
return this.delayAndResolve();
}
private delayAndResolve(): Promise<void> {
return new Promise((resolve, reject) => {