Skip to content

Commit eec82e7

Browse files
authored
mgmt, local generation for Azure Key Vault / Azure Managed HSM 2024-11-01 (Azure#44588)
1 parent 565f4bd commit eec82e7

File tree

75 files changed

+355
-322
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+355
-322
lines changed

eng/code-quality-reports/src/main/resources/revapi/revapi.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,12 @@
731731
"code": "java.field.addedStaticField",
732732
"new": "field com.azure.messaging.webpubsub.models.WebPubSubClientProtocol.SOCKETIO",
733733
"justification": "Additional protocols are supported by Web PubSub."
734+
},
735+
{
736+
"ignore": true,
737+
"code" : "java.method.removed",
738+
"old" : "method com.azure.resourcemanager.keyvault.models.VaultCheckNameAvailabilityParameters com.azure.resourcemanager.keyvault.models.VaultCheckNameAvailabilityParameters::withType(java.lang.String)",
739+
"justification": "The property is a constant, which should not be changed."
734740
}
735741
]
736742
}

sdk/resourcemanager/api-specs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
"dir": "azure-resourcemanager-keyvault",
144144
"source": "specification/keyvault/resource-manager/readme.md",
145145
"package": "com.azure.resourcemanager.keyvault",
146-
"args": "--tag=package-2023-07",
146+
"args": "--tag=package-2024-11-01",
147147
"note": "use local azure-rest-api-specs and remove keys.json, secrets.json and keysManagedHsm.json in README.md tag"
148148
},
149149
"keyvault-hybrid": {

sdk/resourcemanager/azure-resourcemanager-keyvault/CHANGELOG.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,9 @@
22

33
## 2.49.0-beta.1 (Unreleased)
44

5-
### Features Added
6-
7-
### Breaking Changes
8-
9-
### Bugs Fixed
5+
#### Dependency Updates
106

11-
### Other Changes
7+
- Updated `api-version` to `2024-11-01`.
128

139
## 2.48.0 (2025-02-28)
1410

sdk/resourcemanager/azure-resourcemanager-keyvault/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "java",
44
"TagPrefix": "java/resourcemanager/azure-resourcemanager-keyvault",
5-
"Tag": "java/resourcemanager/azure-resourcemanager-keyvault_1a7324e6c1"
5+
"Tag": "java/resourcemanager/azure-resourcemanager-keyvault_96b895be8c"
66
}

sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/models/KeyInner.java

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,19 @@ public final class KeyInner extends Resource {
3131
private KeyProperties innerProperties = new KeyProperties();
3232

3333
/*
34-
* Fully qualified resource Id for the resource.
34+
* The type of the resource.
3535
*/
36-
private String id;
36+
private String type;
3737

3838
/*
3939
* The name of the resource.
4040
*/
4141
private String name;
4242

4343
/*
44-
* The type of the resource.
44+
* Fully qualified resource Id for the resource.
4545
*/
46-
private String type;
46+
private String id;
4747

4848
/**
4949
* Creates an instance of KeyInner class.
@@ -61,13 +61,13 @@ private KeyProperties innerProperties() {
6161
}
6262

6363
/**
64-
* Get the id property: Fully qualified resource Id for the resource.
64+
* Get the type property: The type of the resource.
6565
*
66-
* @return the id value.
66+
* @return the type value.
6767
*/
6868
@Override
69-
public String id() {
70-
return this.id;
69+
public String type() {
70+
return this.type;
7171
}
7272

7373
/**
@@ -81,13 +81,13 @@ public String name() {
8181
}
8282

8383
/**
84-
* Get the type property: The type of the resource.
84+
* Get the id property: Fully qualified resource Id for the resource.
8585
*
86-
* @return the type value.
86+
* @return the id value.
8787
*/
8888
@Override
89-
public String type() {
90-
return this.type;
89+
public String id() {
90+
return this.id;
9191
}
9292

9393
/**
@@ -178,7 +178,8 @@ public KeyInner withKeyOps(List<JsonWebKeyOperation> keyOps) {
178178
}
179179

180180
/**
181-
* Get the keySize property: The key size in bits. For example: 2048, 3072, or 4096 for RSA.
181+
* Get the keySize property: The key size in bits. For example: 2048, 3072, or 4096 for RSA. Default for RSA and
182+
* RSA-HSM keys is 2048. Exception made for bring your own key (BYOK), key exchange keys default to 4096.
182183
*
183184
* @return the keySize value.
184185
*/
@@ -187,7 +188,8 @@ public Integer keySize() {
187188
}
188189

189190
/**
190-
* Set the keySize property: The key size in bits. For example: 2048, 3072, or 4096 for RSA.
191+
* Set the keySize property: The key size in bits. For example: 2048, 3072, or 4096 for RSA. Default for RSA and
192+
* RSA-HSM keys is 2048. Exception made for bring your own key (BYOK), key exchange keys default to 4096.
191193
*
192194
* @param keySize the keySize value to set.
193195
* @return the KeyInner object itself.
@@ -201,7 +203,8 @@ public KeyInner withKeySize(Integer keySize) {
201203
}
202204

203205
/**
204-
* Get the curveName property: The elliptic curve name. For valid values, see JsonWebKeyCurveName.
206+
* Get the curveName property: The elliptic curve name. For valid values, see JsonWebKeyCurveName. Default for EC
207+
* and EC-HSM keys is P-256.
205208
*
206209
* @return the curveName value.
207210
*/
@@ -210,7 +213,8 @@ public JsonWebKeyCurveName curveName() {
210213
}
211214

212215
/**
213-
* Set the curveName property: The elliptic curve name. For valid values, see JsonWebKeyCurveName.
216+
* Set the curveName property: The elliptic curve name. For valid values, see JsonWebKeyCurveName. Default for EC
217+
* and EC-HSM keys is P-256.
214218
*
215219
* @param curveName the curveName value to set.
216220
* @return the KeyInner object itself.

sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/models/KeyProperties.java

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,13 @@ public final class KeyProperties implements JsonSerializable<KeyProperties> {
3939
private List<JsonWebKeyOperation> keyOps;
4040

4141
/*
42-
* The key size in bits. For example: 2048, 3072, or 4096 for RSA.
42+
* The key size in bits. For example: 2048, 3072, or 4096 for RSA. Default for RSA and RSA-HSM keys is 2048.
43+
* Exception made for bring your own key (BYOK), key exchange keys default to 4096.
4344
*/
4445
private Integer keySize;
4546

4647
/*
47-
* The elliptic curve name. For valid values, see JsonWebKeyCurveName.
48+
* The elliptic curve name. For valid values, see JsonWebKeyCurveName. Default for EC and EC-HSM keys is P-256
4849
*/
4950
private JsonWebKeyCurveName curveName;
5051

@@ -135,7 +136,8 @@ public KeyProperties withKeyOps(List<JsonWebKeyOperation> keyOps) {
135136
}
136137

137138
/**
138-
* Get the keySize property: The key size in bits. For example: 2048, 3072, or 4096 for RSA.
139+
* Get the keySize property: The key size in bits. For example: 2048, 3072, or 4096 for RSA. Default for RSA and
140+
* RSA-HSM keys is 2048. Exception made for bring your own key (BYOK), key exchange keys default to 4096.
139141
*
140142
* @return the keySize value.
141143
*/
@@ -144,7 +146,8 @@ public Integer keySize() {
144146
}
145147

146148
/**
147-
* Set the keySize property: The key size in bits. For example: 2048, 3072, or 4096 for RSA.
149+
* Set the keySize property: The key size in bits. For example: 2048, 3072, or 4096 for RSA. Default for RSA and
150+
* RSA-HSM keys is 2048. Exception made for bring your own key (BYOK), key exchange keys default to 4096.
148151
*
149152
* @param keySize the keySize value to set.
150153
* @return the KeyProperties object itself.
@@ -155,7 +158,8 @@ public KeyProperties withKeySize(Integer keySize) {
155158
}
156159

157160
/**
158-
* Get the curveName property: The elliptic curve name. For valid values, see JsonWebKeyCurveName.
161+
* Get the curveName property: The elliptic curve name. For valid values, see JsonWebKeyCurveName. Default for EC
162+
* and EC-HSM keys is P-256.
159163
*
160164
* @return the curveName value.
161165
*/
@@ -164,7 +168,8 @@ public JsonWebKeyCurveName curveName() {
164168
}
165169

166170
/**
167-
* Set the curveName property: The elliptic curve name. For valid values, see JsonWebKeyCurveName.
171+
* Set the curveName property: The elliptic curve name. For valid values, see JsonWebKeyCurveName. Default for EC
172+
* and EC-HSM keys is P-256.
168173
*
169174
* @param curveName the curveName value to set.
170175
* @return the KeyProperties object itself.

sdk/resourcemanager/azure-resourcemanager-keyvault/src/main/java/com/azure/resourcemanager/keyvault/fluent/models/ManagedHsmInner.java

Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,24 @@ public final class ManagedHsmInner extends ManagedHsmResource {
2727
private ManagedHsmProperties properties;
2828

2929
/*
30-
* Fully qualified resource Id for the resource.
30+
* Metadata pertaining to creation and last modification of the key vault resource.
3131
*/
32-
private String id;
32+
private SystemData systemData;
3333

3434
/*
35-
* The name of the resource.
35+
* The type of the resource.
3636
*/
37-
private String name;
37+
private String type;
3838

3939
/*
40-
* The type of the resource.
40+
* The name of the resource.
4141
*/
42-
private String type;
42+
private String name;
4343

4444
/*
45-
* Metadata pertaining to creation and last modification of the key vault resource.
45+
* Fully qualified resource Id for the resource.
4646
*/
47-
private SystemData systemData;
47+
private String id;
4848

4949
/**
5050
* Creates an instance of ManagedHsmInner class.
@@ -73,43 +73,43 @@ public ManagedHsmInner withProperties(ManagedHsmProperties properties) {
7373
}
7474

7575
/**
76-
* Get the id property: Fully qualified resource Id for the resource.
76+
* Get the systemData property: Metadata pertaining to creation and last modification of the key vault resource.
7777
*
78-
* @return the id value.
78+
* @return the systemData value.
7979
*/
8080
@Override
81-
public String id() {
82-
return this.id;
81+
public SystemData systemData() {
82+
return this.systemData;
8383
}
8484

8585
/**
86-
* Get the name property: The name of the resource.
86+
* Get the type property: The type of the resource.
8787
*
88-
* @return the name value.
88+
* @return the type value.
8989
*/
9090
@Override
91-
public String name() {
92-
return this.name;
91+
public String type() {
92+
return this.type;
9393
}
9494

9595
/**
96-
* Get the type property: The type of the resource.
96+
* Get the name property: The name of the resource.
9797
*
98-
* @return the type value.
98+
* @return the name value.
9999
*/
100100
@Override
101-
public String type() {
102-
return this.type;
101+
public String name() {
102+
return this.name;
103103
}
104104

105105
/**
106-
* Get the systemData property: Metadata pertaining to creation and last modification of the key vault resource.
106+
* Get the id property: Fully qualified resource Id for the resource.
107107
*
108-
* @return the systemData value.
108+
* @return the id value.
109109
*/
110110
@Override
111-
public SystemData systemData() {
112-
return this.systemData;
111+
public String id() {
112+
return this.id;
113113
}
114114

115115
/**
@@ -155,10 +155,15 @@ public ManagedHsmInner withTags(Map<String, String> tags) {
155155
*/
156156
@Override
157157
public void validate() {
158-
super.validate();
159158
if (properties() != null) {
160159
properties().validate();
161160
}
161+
if (sku() != null) {
162+
sku().validate();
163+
}
164+
if (identity() != null) {
165+
identity().validate();
166+
}
162167
}
163168

164169
/**

0 commit comments

Comments
 (0)