Skip to content

Commit 7f68e50

Browse files
authored
Batch: upgrade to API version 2021-01-01 (#1356)
* update batch spec * generate package-2021-01 * fix compile errors and add deprecate for breaking changes * add taskSlotsPerNode in Pool * update session records * fix checkstyle * run credcheck * update credcheck
1 parent b324fab commit 7f68e50

File tree

59 files changed

+5694
-2562
lines changed

Some content is hidden

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

59 files changed

+5694
-2562
lines changed

api-specs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"dir": "azure-mgmt-batch",
4040
"source": "specification/batch/resource-manager/readme.md",
4141
"package": "com.microsoft.azure.management.batch",
42-
"args": "--payload-flattening-threshold=1 --tag=package-2019-08"
42+
"args": "--payload-flattening-threshold=1 --tag=package-2021-01"
4343
},
4444
"batchai": {
4545
"dir": "azure-mgmt-batchai",

azure-mgmt-batch/src/main/java/com/microsoft/azure/management/batch/BatchAccountCreateParameters.java

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,29 @@ public class BatchAccountCreateParameters {
5353
@JsonProperty(value = "properties.keyVaultReference")
5454
private KeyVaultReference keyVaultReference;
5555

56+
/**
57+
* The network access type for accessing Azure Batch account.
58+
* If not specified, the default value is 'enabled'. Possible values
59+
* include: 'Enabled', 'Disabled'.
60+
*/
61+
@JsonProperty(value = "properties.publicNetworkAccess")
62+
private PublicNetworkAccessType publicNetworkAccess;
63+
64+
/**
65+
* The encryption configuration for the Batch account.
66+
* Configures how customer data is encrypted inside the Batch account. By
67+
* default, accounts are encrypted using a Microsoft managed key. For
68+
* additional control, a customer-managed key can be used instead.
69+
*/
70+
@JsonProperty(value = "properties.encryption")
71+
private EncryptionProperties encryption;
72+
73+
/**
74+
* The identity of the Batch account.
75+
*/
76+
@JsonProperty(value = "identity")
77+
private BatchAccountIdentity identity;
78+
5679
/**
5780
* Get the region in which to create the account.
5881
*
@@ -153,4 +176,64 @@ public BatchAccountCreateParameters withKeyVaultReference(KeyVaultReference keyV
153176
return this;
154177
}
155178

179+
/**
180+
* Get if not specified, the default value is 'enabled'. Possible values include: 'Enabled', 'Disabled'.
181+
*
182+
* @return the publicNetworkAccess value
183+
*/
184+
public PublicNetworkAccessType publicNetworkAccess() {
185+
return this.publicNetworkAccess;
186+
}
187+
188+
/**
189+
* Set if not specified, the default value is 'enabled'. Possible values include: 'Enabled', 'Disabled'.
190+
*
191+
* @param publicNetworkAccess the publicNetworkAccess value to set
192+
* @return the BatchAccountCreateParameters object itself.
193+
*/
194+
public BatchAccountCreateParameters withPublicNetworkAccess(PublicNetworkAccessType publicNetworkAccess) {
195+
this.publicNetworkAccess = publicNetworkAccess;
196+
return this;
197+
}
198+
199+
/**
200+
* Get configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed key can be used instead.
201+
*
202+
* @return the encryption value
203+
*/
204+
public EncryptionProperties encryption() {
205+
return this.encryption;
206+
}
207+
208+
/**
209+
* Set configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed key can be used instead.
210+
*
211+
* @param encryption the encryption value to set
212+
* @return the BatchAccountCreateParameters object itself.
213+
*/
214+
public BatchAccountCreateParameters withEncryption(EncryptionProperties encryption) {
215+
this.encryption = encryption;
216+
return this;
217+
}
218+
219+
/**
220+
* Get the identity of the Batch account.
221+
*
222+
* @return the identity value
223+
*/
224+
public BatchAccountIdentity identity() {
225+
return this.identity;
226+
}
227+
228+
/**
229+
* Set the identity of the Batch account.
230+
*
231+
* @param identity the identity value to set
232+
* @return the BatchAccountCreateParameters object itself.
233+
*/
234+
public BatchAccountCreateParameters withIdentity(BatchAccountIdentity identity) {
235+
this.identity = identity;
236+
return this;
237+
}
238+
156239
}
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
/**
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for
4+
* license information.
5+
*
6+
* Code generated by Microsoft (R) AutoRest Code Generator.
7+
*/
8+
9+
package com.microsoft.azure.management.batch;
10+
11+
import java.util.Map;
12+
import com.fasterxml.jackson.annotation.JsonProperty;
13+
14+
/**
15+
* The identity of the Batch account, if configured. This is only used when the
16+
* user specifies 'Microsoft.KeyVault' as their Batch account encryption
17+
* configuration.
18+
*/
19+
public class BatchAccountIdentity {
20+
/**
21+
* The principal id of the Batch account. This property will only be
22+
* provided for a system assigned identity.
23+
*/
24+
@JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY)
25+
private String principalId;
26+
27+
/**
28+
* The tenant id associated with the Batch account. This property will only
29+
* be provided for a system assigned identity.
30+
*/
31+
@JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY)
32+
private String tenantId;
33+
34+
/**
35+
* The type of identity used for the Batch account. Possible values
36+
* include: 'SystemAssigned', 'UserAssigned', 'None'.
37+
*/
38+
@JsonProperty(value = "type", required = true)
39+
private ResourceIdentityType type;
40+
41+
/**
42+
* The list of user identities associated with the Batch account. The user
43+
* identity dictionary key references will be ARM resource ids in the form:
44+
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
45+
*/
46+
@JsonProperty(value = "userAssignedIdentities")
47+
private Map<String, BatchAccountIdentityUserAssignedIdentitiesValue> userAssignedIdentities;
48+
49+
/**
50+
* Get the principal id of the Batch account. This property will only be provided for a system assigned identity.
51+
*
52+
* @return the principalId value
53+
*/
54+
public String principalId() {
55+
return this.principalId;
56+
}
57+
58+
/**
59+
* Get the tenant id associated with the Batch account. This property will only be provided for a system assigned identity.
60+
*
61+
* @return the tenantId value
62+
*/
63+
public String tenantId() {
64+
return this.tenantId;
65+
}
66+
67+
/**
68+
* Get the type of identity used for the Batch account. Possible values include: 'SystemAssigned', 'UserAssigned', 'None'.
69+
*
70+
* @return the type value
71+
*/
72+
public ResourceIdentityType type() {
73+
return this.type;
74+
}
75+
76+
/**
77+
* Set the type of identity used for the Batch account. Possible values include: 'SystemAssigned', 'UserAssigned', 'None'.
78+
*
79+
* @param type the type value to set
80+
* @return the BatchAccountIdentity object itself.
81+
*/
82+
public BatchAccountIdentity withType(ResourceIdentityType type) {
83+
this.type = type;
84+
return this;
85+
}
86+
87+
/**
88+
* Get the list of user identities associated with the Batch account. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
89+
*
90+
* @return the userAssignedIdentities value
91+
*/
92+
public Map<String, BatchAccountIdentityUserAssignedIdentitiesValue> userAssignedIdentities() {
93+
return this.userAssignedIdentities;
94+
}
95+
96+
/**
97+
* Set the list of user identities associated with the Batch account. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
98+
*
99+
* @param userAssignedIdentities the userAssignedIdentities value to set
100+
* @return the BatchAccountIdentity object itself.
101+
*/
102+
public BatchAccountIdentity withUserAssignedIdentities(Map<String, BatchAccountIdentityUserAssignedIdentitiesValue> userAssignedIdentities) {
103+
this.userAssignedIdentities = userAssignedIdentities;
104+
return this;
105+
}
106+
107+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/**
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for
4+
* license information.
5+
*
6+
* Code generated by Microsoft (R) AutoRest Code Generator.
7+
*/
8+
9+
package com.microsoft.azure.management.batch;
10+
11+
import com.fasterxml.jackson.annotation.JsonProperty;
12+
13+
/**
14+
* The BatchAccountIdentityUserAssignedIdentitiesValue model.
15+
*/
16+
public class BatchAccountIdentityUserAssignedIdentitiesValue {
17+
/**
18+
* The principal id of user assigned identity.
19+
*/
20+
@JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY)
21+
private String principalId;
22+
23+
/**
24+
* The client id of user assigned identity.
25+
*/
26+
@JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY)
27+
private String clientId;
28+
29+
/**
30+
* Get the principal id of user assigned identity.
31+
*
32+
* @return the principalId value
33+
*/
34+
public String principalId() {
35+
return this.principalId;
36+
}
37+
38+
/**
39+
* Get the client id of user assigned identity.
40+
*
41+
* @return the clientId value
42+
*/
43+
public String clientId() {
44+
return this.clientId;
45+
}
46+
47+
}

azure-mgmt-batch/src/main/java/com/microsoft/azure/management/batch/BatchAccountUpdateParameters.java

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,21 @@ public class BatchAccountUpdateParameters {
2929
@JsonProperty(value = "properties.autoStorage")
3030
private AutoStorageBaseProperties autoStorage;
3131

32+
/**
33+
* The encryption configuration for the Batch account.
34+
* Configures how customer data is encrypted inside the Batch account. By
35+
* default, accounts are encrypted using a Microsoft managed key. For
36+
* additional control, a customer-managed key can be used instead.
37+
*/
38+
@JsonProperty(value = "properties.encryption")
39+
private EncryptionProperties encryption;
40+
41+
/**
42+
* The identity of the Batch account.
43+
*/
44+
@JsonProperty(value = "identity")
45+
private BatchAccountIdentity identity;
46+
3247
/**
3348
* Get the user-specified tags associated with the account.
3449
*
@@ -69,4 +84,44 @@ public BatchAccountUpdateParameters withAutoStorage(AutoStorageBaseProperties au
6984
return this;
7085
}
7186

87+
/**
88+
* Get configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed key can be used instead.
89+
*
90+
* @return the encryption value
91+
*/
92+
public EncryptionProperties encryption() {
93+
return this.encryption;
94+
}
95+
96+
/**
97+
* Set configures how customer data is encrypted inside the Batch account. By default, accounts are encrypted using a Microsoft managed key. For additional control, a customer-managed key can be used instead.
98+
*
99+
* @param encryption the encryption value to set
100+
* @return the BatchAccountUpdateParameters object itself.
101+
*/
102+
public BatchAccountUpdateParameters withEncryption(EncryptionProperties encryption) {
103+
this.encryption = encryption;
104+
return this;
105+
}
106+
107+
/**
108+
* Get the identity of the Batch account.
109+
*
110+
* @return the identity value
111+
*/
112+
public BatchAccountIdentity identity() {
113+
return this.identity;
114+
}
115+
116+
/**
117+
* Set the identity of the Batch account.
118+
*
119+
* @param identity the identity value to set
120+
* @return the BatchAccountUpdateParameters object itself.
121+
*/
122+
public BatchAccountUpdateParameters withIdentity(BatchAccountIdentity identity) {
123+
this.identity = identity;
124+
return this;
125+
}
126+
72127
}

0 commit comments

Comments
 (0)