24
24
import com .microsoft .azure .management .batch .ApplicationPackage ;
25
25
import com .microsoft .azure .management .batch .BatchAccount ;
26
26
import com .microsoft .azure .management .batch .BatchAccountKeys ;
27
+ import com .microsoft .azure .management .batchai .AzureFileShareReference ;
27
28
import com .microsoft .azure .management .batchai .BatchAICluster ;
28
29
import com .microsoft .azure .management .batchai .BatchAIJob ;
29
30
import com .microsoft .azure .management .compute .AvailabilitySet ;
45
46
import com .microsoft .azure .management .containerservice .ContainerServiceOrchestratorTypes ;
46
47
import com .microsoft .azure .management .containerservice .KubernetesCluster ;
47
48
import com .microsoft .azure .management .cosmosdb .CosmosDBAccount ;
49
+ import com .microsoft .azure .management .cosmosdb .DatabaseAccountListKeysResult ;
50
+ import com .microsoft .azure .management .cosmosdb .DatabaseAccountListReadOnlyKeysResult ;
48
51
import com .microsoft .azure .management .dns .ARecordSet ;
49
52
import com .microsoft .azure .management .dns .AaaaRecordSet ;
50
53
import com .microsoft .azure .management .dns .CNameRecordSet ;
72
75
import com .microsoft .azure .management .graphrbac .RoleAssignment ;
73
76
import com .microsoft .azure .management .graphrbac .RoleDefinition ;
74
77
import com .microsoft .azure .management .graphrbac .ServicePrincipal ;
75
- import com .microsoft .azure .management .graphrbac .implementation . PermissionInner ;
78
+ import com .microsoft .azure .management .graphrbac .Permission ;
76
79
import com .microsoft .azure .management .keyvault .AccessPolicy ;
77
80
import com .microsoft .azure .management .keyvault .Vault ;
78
81
import com .microsoft .azure .management .locks .ManagementLock ;
@@ -2276,6 +2279,14 @@ public static void print(CosmosDBAccount cosmosDBAccount) {
2276
2279
.append ("\n \t Default consistency level: " ).append (cosmosDBAccount .consistencyPolicy ().defaultConsistencyLevel ())
2277
2280
.append ("\n \t IP range filter: " ).append (cosmosDBAccount .ipRangeFilter ());
2278
2281
2282
+ DatabaseAccountListKeysResult keys = cosmosDBAccount .listKeys ();
2283
+ DatabaseAccountListReadOnlyKeysResult readOnlyKeys = cosmosDBAccount .listReadOnlyKeys ();
2284
+ builder
2285
+ .append ("\n \t Primary Master Key: " ).append (keys .primaryMasterKey ())
2286
+ .append ("\n \t Secondary Master Key: " ).append (keys .secondaryMasterKey ())
2287
+ .append ("\n \t Primary Read-Only Key: " ).append (readOnlyKeys .primaryReadonlyMasterKey ())
2288
+ .append ("\n \t Secondary Read-Only Key: " ).append (readOnlyKeys .secondaryReadonlyMasterKey ());
2289
+
2279
2290
for (com .microsoft .azure .management .cosmosdb .Location writeReplica : cosmosDBAccount .writableReplications ()) {
2280
2291
builder .append ("\n \t \t Write replication: " )
2281
2292
.append ("\n \t \t \t Name :" ).append (writeReplica .locationName ());
@@ -2286,6 +2297,7 @@ public static void print(CosmosDBAccount cosmosDBAccount) {
2286
2297
builder .append ("\n \t \t Read replication: " )
2287
2298
.append ("\n \t \t \t Name :" ).append (readReplica .locationName ());
2288
2299
}
2300
+
2289
2301
}
2290
2302
2291
2303
/**
@@ -2317,9 +2329,9 @@ public static void print(RoleDefinition role) {
2317
2329
.append ("\n \t Description: " ).append (role .description ())
2318
2330
.append ("\n \t Type: " ).append (role .type ());
2319
2331
2320
- Set <PermissionInner > permissions = role .permissions ();
2332
+ Set <Permission > permissions = role .permissions ();
2321
2333
builder .append ("\n \t Permissions: " ).append (permissions .size ());
2322
- for (PermissionInner permission : permissions ) {
2334
+ for (Permission permission : permissions ) {
2323
2335
builder .append ("\n \t \t Permission Actions: " + permission .actions ().size ());
2324
2336
for (String action : permission .actions ()) {
2325
2337
builder .append ("\n \t \t \t Name :" ).append (action );
@@ -2470,7 +2482,10 @@ public static void print(VerificationIPFlow resource) {
2470
2482
*/
2471
2483
public static void print (Topology resource ) {
2472
2484
StringBuilder sb = new StringBuilder ().append ("Topology: " ).append (resource .id ())
2473
- .append ("\n \t Resource group: " ).append (resource .resourceGroupName ())
2485
+ .append ("\n \t Topology parameters: " )
2486
+ .append ("\n \t \t Resource group: " ).append (resource .topologyParameters ().targetResourceGroupName ())
2487
+ .append ("\n \t \t Virtual network: " ).append (resource .topologyParameters ().targetVirtualNetwork () == null ? "" : resource .topologyParameters ().targetVirtualNetwork ().id ())
2488
+ .append ("\n \t \t Subnet id: " ).append (resource .topologyParameters ().targetSubnet () == null ? "" : resource .topologyParameters ().targetSubnet ().id ())
2474
2489
.append ("\n \t Created time: " ).append (resource .createdTime ())
2475
2490
.append ("\n \t Last modified time: " ).append (resource .lastModifiedTime ());
2476
2491
for (TopologyResource tr : resource .resources ().values ()) {
@@ -2763,8 +2778,8 @@ public static void print(BatchAICluster resource) {
2763
2778
StringBuilder info = new StringBuilder ("Batch AI cluster: " )
2764
2779
.append ("\n \t Id: " ).append (resource .id ())
2765
2780
.append ("\n \t Name: " ).append (resource .name ())
2766
- .append ("\n \t Resource group: " ).append (resource .resourceGroupName ())
2767
- .append ("\n \t Region: " ).append (resource .regionName ())
2781
+ .append ("\n \t Resource group: " ).append (resource .workspace (). resourceGroupName ())
2782
+ .append ("\n \t Region: " ).append (resource .workspace (). regionName ())
2768
2783
.append ("\n \t VM Size: " ).append (resource .vmSize ())
2769
2784
.append ("\n \t VM Priority: " ).append (resource .vmPriority ())
2770
2785
.append ("\n \t Subnet: " ).append (resource .subnet ())
@@ -2804,7 +2819,6 @@ public static void print(BatchAICluster resource) {
2804
2819
if (resource .nodeSetup () != null && resource .nodeSetup ().setupTask () != null ) {
2805
2820
info .append ("\n \t Setup task: " )
2806
2821
.append ("\n \t \t Command line: " ).append (resource .nodeSetup ().setupTask ().commandLine ())
2807
- .append ("\n \t \t Run elevated: " ).append (resource .nodeSetup ().setupTask ().runElevated ())
2808
2822
.append ("\n \t \t Stdout/err Path Prefix: " ).append (resource .nodeSetup ().setupTask ().stdOutErrPathPrefix ());
2809
2823
}
2810
2824
System .out .println (info .toString ());
@@ -2819,15 +2833,27 @@ public static void print(BatchAIJob resource) {
2819
2833
StringBuilder info = new StringBuilder ("Batch AI job: " )
2820
2834
.append ("\n \t Id: " ).append (resource .id ())
2821
2835
.append ("\n \t Name: " ).append (resource .name ())
2822
- .append ("\n \t Resource group: " ).append (resource .resourceGroupName ())
2823
2836
.append ("\n \t Cluster Id: " ).append (resource .cluster ())
2824
2837
.append ("\n \t Creation time: " ).append (resource .creationTime ())
2825
2838
.append ("\n \t Node count: " ).append (resource .nodeCount ())
2826
- .append ("\n \t Priority: " ).append (resource .priority ())
2839
+ .append ("\n \t Priority: " ).append (resource .schedulingPriority ())
2827
2840
.append ("\n \t Execution state: " ).append (resource .executionState ())
2828
2841
.append ("\n \t Execution state transition time: " ).append (resource .executionStateTransitionTime ())
2829
2842
.append ("\n \t Tool type: " ).append (resource .toolType ())
2830
- .append ("\n \t Experiment name: " ).append (resource .experimentName ());
2843
+ .append ("\n \t Experiment name: " ).append (resource .experiment ().name ());
2844
+ if (resource .mountVolumes () != null ) {
2845
+ info .append ("\n \t Mount volumes:" );
2846
+ if (resource .mountVolumes ().azureFileShares () != null ) {
2847
+ info .append ("\n \t \t Azure fileshares:" );
2848
+ for (AzureFileShareReference share : resource .mountVolumes ().azureFileShares ()) {
2849
+ info .append ("\n \t \t \t Account name:" ).append (share .accountName ())
2850
+ .append ("\n \t \t \t File Url:" ).append (share .azureFileUrl ())
2851
+ .append ("\n \t \t \t Directory mode:" ).append (share .directoryMode ())
2852
+ .append ("\n \t \t \t File mode:" ).append (share .fileMode ())
2853
+ .append ("\n \t \t \t Relative mount path:" ).append (share .relativeMountPath ());
2854
+ }
2855
+ }
2856
+ }
2831
2857
System .out .println (info .toString ());
2832
2858
}
2833
2859
@@ -2901,4 +2927,4 @@ public static String curl(String url) {
2901
2927
return null ;
2902
2928
}
2903
2929
}
2904
- }
2930
+ }
0 commit comments