Skip to content

Commit c0dce6d

Browse files
author
SDKAuto
committed
CodeGen from PR 17469 in Azure/azure-rest-api-specs
Merge f38c9b9dc092669971fc5abf3094268869bfd0da into 0e23c192cdbcb623f97d685567e118f9ef6a724f
1 parent 3944197 commit c0dce6d

File tree

14 files changed

+472
-34
lines changed

14 files changed

+472
-34
lines changed

sdk/locks/arm-locks/CHANGELOG.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
# Release History
2-
3-
## 2.0.1 (Unreleased)
4-
5-
### Features Added
6-
7-
### Breaking Changes
8-
9-
### Bugs Fixed
10-
11-
### Other Changes
12-
2+
3+
## 2.1.0 (2022-01-24)
4+
5+
**Features**
6+
7+
- Added Interface ErrorAdditionalInfo
8+
- Added Interface ErrorDetail
9+
- Added Interface ErrorResponse
10+
- Added Interface SystemData
11+
- Added Type Alias CreatedByType
12+
- Interface ManagementLockObject has a new optional parameter systemData
13+
- Added Enum KnownCreatedByType
14+
15+
1316
## 2.0.0 (2021-12-07)
1417

1518
The package of @azure/arm-locks is using our next generation design principles since version 2.0.0, which contains breaking changes.

sdk/locks/arm-locks/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2021 Microsoft
3+
Copyright (c) 2022 Microsoft
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

sdk/locks/arm-locks/_meta.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"commit": "a42f1b58607091c4f255ead152a8ef323fa0b280",
2+
"commit": "3b57fec8154d5269919485ec3f308fa60f1b5772",
33
"readme": "specification/resources/resource-manager/readme.md",
4-
"autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/resources/resource-manager/readme.md --use=@autorest/[email protected].20211130.1",
4+
"autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/resources/resource-manager/readme.md --use=@autorest/[email protected].20220105.1",
55
"repository_url": "https://github.com/Azure/azure-rest-api-specs.git",
6-
"use": "@autorest/[email protected].20211130.1"
6+
"use": "@autorest/[email protected].20220105.1"
77
}
Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,31 @@
11
{
22
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
33
"mainEntryPointFilePath": "./dist-esm/src/index.d.ts",
4-
"docModel": { "enabled": true },
5-
"apiReport": { "enabled": true, "reportFolder": "./review" },
4+
"docModel": {
5+
"enabled": true
6+
},
7+
"apiReport": {
8+
"enabled": true,
9+
"reportFolder": "./review"
10+
},
611
"dtsRollup": {
712
"enabled": true,
813
"untrimmedFilePath": "",
914
"publicTrimmedFilePath": "./types/arm-locks.d.ts"
1015
},
1116
"messages": {
12-
"tsdocMessageReporting": { "default": { "logLevel": "none" } },
17+
"tsdocMessageReporting": {
18+
"default": {
19+
"logLevel": "none"
20+
}
21+
},
1322
"extractorMessageReporting": {
14-
"ae-missing-release-tag": { "logLevel": "none" },
15-
"ae-unresolved-link": { "logLevel": "none" }
23+
"ae-missing-release-tag": {
24+
"logLevel": "none"
25+
},
26+
"ae-unresolved-link": {
27+
"logLevel": "none"
28+
}
1629
}
1730
}
18-
}
31+
}

sdk/locks/arm-locks/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"sdk-type": "mgmt",
44
"author": "Microsoft Corporation",
55
"description": "A generated SDK for ManagementLockClient.",
6-
"version": "2.0.1",
6+
"version": "2.1.0",
77
"engines": {
88
"node": ">=12.0.0"
99
},
@@ -97,4 +97,4 @@
9797
},
9898
"sideEffects": false,
9999
"autoPublish": true
100-
}
100+
}

sdk/locks/arm-locks/review/arm-locks.api.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,41 @@ export interface AuthorizationOperationsListOptionalParams extends coreClient.Op
2727
// @public
2828
export type AuthorizationOperationsListResponse = OperationListResult;
2929

30+
// @public
31+
export type CreatedByType = string;
32+
33+
// @public
34+
export interface ErrorAdditionalInfo {
35+
readonly info?: Record<string, unknown>;
36+
readonly type?: string;
37+
}
38+
39+
// @public
40+
export interface ErrorDetail {
41+
readonly additionalInfo?: ErrorAdditionalInfo[];
42+
readonly code?: string;
43+
readonly details?: ErrorDetail[];
44+
readonly message?: string;
45+
readonly target?: string;
46+
}
47+
48+
// @public
49+
export interface ErrorResponse {
50+
error?: ErrorDetail;
51+
}
52+
53+
// @public
54+
export enum KnownCreatedByType {
55+
// (undocumented)
56+
Application = "Application",
57+
// (undocumented)
58+
Key = "Key",
59+
// (undocumented)
60+
ManagedIdentity = "ManagedIdentity",
61+
// (undocumented)
62+
User = "User"
63+
}
64+
3065
// @public
3166
export enum KnownLockLevel {
3267
// (undocumented)
@@ -75,6 +110,7 @@ export interface ManagementLockObject {
75110
readonly name?: string;
76111
notes?: string;
77112
owners?: ManagementLockOwner[];
113+
readonly systemData?: SystemData;
78114
readonly type?: string;
79115
}
80116

@@ -258,6 +294,16 @@ export interface OperationListResult {
258294
value?: Operation[];
259295
}
260296

297+
// @public
298+
export interface SystemData {
299+
createdAt?: Date;
300+
createdBy?: string;
301+
createdByType?: CreatedByType;
302+
lastModifiedAt?: Date;
303+
lastModifiedBy?: string;
304+
lastModifiedByType?: CreatedByType;
305+
}
306+
261307
// (No @packageDocumentation comment for this package)
262308

263309
```

sdk/locks/arm-locks/src/managementLockClient.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export class ManagementLockClient extends coreClient.ServiceClient {
4747
credential: credentials
4848
};
4949

50-
const packageDetails = `azsdk-js-arm-locks/2.0.0`;
50+
const packageDetails = `azsdk-js-arm-locks/2.1.0`;
5151
const userAgentPrefix =
5252
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
5353
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
@@ -70,7 +70,7 @@ export class ManagementLockClient extends coreClient.ServiceClient {
7070

7171
// Assigning values to Constant parameters
7272
this.$host = options.$host || "https://management.azure.com";
73-
this.apiVersion = options.apiVersion || "2016-09-01";
73+
this.apiVersion = options.apiVersion || "2020-05-01";
7474
this.authorizationOperations = new AuthorizationOperationsImpl(this);
7575
this.managementLocks = new ManagementLocksImpl(this);
7676
}

sdk/locks/arm-locks/src/models/index.ts

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,55 @@ export interface OperationDisplay {
3434
operation?: string;
3535
}
3636

37+
/** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */
38+
export interface ErrorResponse {
39+
/** The error object. */
40+
error?: ErrorDetail;
41+
}
42+
43+
/** The error detail. */
44+
export interface ErrorDetail {
45+
/**
46+
* The error code.
47+
* NOTE: This property will not be serialized. It can only be populated by the server.
48+
*/
49+
readonly code?: string;
50+
/**
51+
* The error message.
52+
* NOTE: This property will not be serialized. It can only be populated by the server.
53+
*/
54+
readonly message?: string;
55+
/**
56+
* The error target.
57+
* NOTE: This property will not be serialized. It can only be populated by the server.
58+
*/
59+
readonly target?: string;
60+
/**
61+
* The error details.
62+
* NOTE: This property will not be serialized. It can only be populated by the server.
63+
*/
64+
readonly details?: ErrorDetail[];
65+
/**
66+
* The error additional info.
67+
* NOTE: This property will not be serialized. It can only be populated by the server.
68+
*/
69+
readonly additionalInfo?: ErrorAdditionalInfo[];
70+
}
71+
72+
/** The resource management error additional info. */
73+
export interface ErrorAdditionalInfo {
74+
/**
75+
* The additional info type.
76+
* NOTE: This property will not be serialized. It can only be populated by the server.
77+
*/
78+
readonly type?: string;
79+
/**
80+
* The additional info.
81+
* NOTE: This property will not be serialized. It can only be populated by the server.
82+
*/
83+
readonly info?: Record<string, unknown>;
84+
}
85+
3786
/** The lock information. */
3887
export interface ManagementLockObject {
3988
/**
@@ -51,6 +100,11 @@ export interface ManagementLockObject {
51100
* NOTE: This property will not be serialized. It can only be populated by the server.
52101
*/
53102
readonly name?: string;
103+
/**
104+
* Metadata pertaining to creation and last modification of the resource.
105+
* NOTE: This property will not be serialized. It can only be populated by the server.
106+
*/
107+
readonly systemData?: SystemData;
54108
/** The level of the lock. Possible values are: NotSpecified, CanNotDelete, ReadOnly. CanNotDelete means authorized users are able to read and modify the resources, but not delete. ReadOnly means authorized users can only read from a resource, but they can't modify or delete it. */
55109
level: LockLevel;
56110
/** Notes about the lock. Maximum of 512 characters. */
@@ -65,6 +119,22 @@ export interface ManagementLockOwner {
65119
applicationId?: string;
66120
}
67121

122+
/** Metadata pertaining to creation and last modification of the resource. */
123+
export interface SystemData {
124+
/** The identity that created the resource. */
125+
createdBy?: string;
126+
/** The type of identity that created the resource. */
127+
createdByType?: CreatedByType;
128+
/** The timestamp of resource creation (UTC). */
129+
createdAt?: Date;
130+
/** The identity that last modified the resource. */
131+
lastModifiedBy?: string;
132+
/** The type of identity that last modified the resource. */
133+
lastModifiedByType?: CreatedByType;
134+
/** The timestamp of resource last modification (UTC) */
135+
lastModifiedAt?: Date;
136+
}
137+
68138
/** The list of locks. */
69139
export interface ManagementLockListResult {
70140
/** The list of locks. */
@@ -91,6 +161,26 @@ export enum KnownLockLevel {
91161
*/
92162
export type LockLevel = string;
93163

164+
/** Known values of {@link CreatedByType} that the service accepts. */
165+
export enum KnownCreatedByType {
166+
User = "User",
167+
Application = "Application",
168+
ManagedIdentity = "ManagedIdentity",
169+
Key = "Key"
170+
}
171+
172+
/**
173+
* Defines values for CreatedByType. \
174+
* {@link KnownCreatedByType} can be used interchangeably with CreatedByType,
175+
* this enum contains the known values that the service supports.
176+
* ### Known values supported by the service
177+
* **User** \
178+
* **Application** \
179+
* **ManagedIdentity** \
180+
* **Key**
181+
*/
182+
export type CreatedByType = string;
183+
94184
/** Optional parameters. */
95185
export interface AuthorizationOperationsListOptionalParams
96186
extends coreClient.OperationOptions {}

0 commit comments

Comments
 (0)