@@ -1151,15 +1151,15 @@ public virtual async Task<TPage> ListImageDetailsAsync<TPage>(Url url, Cancellat
11511151 public virtual async Task < T > ListSecurityGroupsAsync < T > ( string serverId = null , CancellationToken cancellationToken = default ( CancellationToken ) )
11521152 where T : IEnumerable < IServiceResource >
11531153 {
1154- var result = await BuildListSecurityGropusAsync ( serverId , cancellationToken )
1154+ var result = await BuildListSecurityGroupsAsync ( serverId , cancellationToken )
11551155 . SendAsync ( )
11561156 . ReceiveJson < T > ( ) ;
11571157 result . PropogateOwner ( this ) ;
11581158 return result ;
11591159 }
11601160
11611161 /// <summary />
1162- public virtual async Task < PreparedRequest > BuildListSecurityGropusAsync ( string serverId = null , CancellationToken cancellationToken = default ( CancellationToken ) )
1162+ public virtual async Task < PreparedRequest > BuildListSecurityGroupsAsync ( string serverId = null , CancellationToken cancellationToken = default ( CancellationToken ) )
11631163 {
11641164 Url endpoint = await UrlBuilder . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
11651165
@@ -1246,6 +1246,204 @@ public virtual async Task<TPage> ListImageDetailsAsync<TPage>(Url url, Cancellat
12461246
12471247 #endregion
12481248
1249+ #region Server Groups
1250+
1251+ /// <summary />
1252+ public virtual async Task < T > GetServerGroupAsync < T > ( string serverGroupId , CancellationToken cancellationToken = default ( CancellationToken ) )
1253+ where T : IServiceResource
1254+ {
1255+ var result = await BuildGetServerGroupsAsync ( serverGroupId , cancellationToken )
1256+ . SendAsync ( )
1257+ . ReceiveJson < T > ( ) ;
1258+ result . PropogateOwner ( this ) ;
1259+ return result ;
1260+ }
1261+
1262+ /// <summary />
1263+ public virtual async Task < PreparedRequest > BuildGetServerGroupsAsync ( string serverGroupId , CancellationToken cancellationToken = default ( CancellationToken ) )
1264+ {
1265+ if ( serverGroupId == null )
1266+ throw new ArgumentNullException ( "serverGroupId" ) ;
1267+
1268+ Url endpoint = await UrlBuilder . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
1269+
1270+ return endpoint
1271+ . AppendPathSegment ( $ "os-server-groups/{ serverGroupId } ")
1272+ . Authenticate ( AuthenticationProvider )
1273+ . SetMicroversion ( this )
1274+ . PrepareGet ( cancellationToken ) ;
1275+ }
1276+
1277+ /// <summary />
1278+ public virtual async Task < T > CreateServerGroupAsync < T > ( object serverGroup , CancellationToken cancellationToken = default ( CancellationToken ) )
1279+ where T : IServiceResource
1280+ {
1281+ var result = await BuildCreateServerGroupAsync ( serverGroup , cancellationToken ) . SendAsync ( ) . ReceiveJson < T > ( ) ;
1282+ result . PropogateOwner ( this ) ;
1283+ return result ;
1284+ }
1285+
1286+ /// <summary />
1287+ public virtual async Task < PreparedRequest > BuildCreateServerGroupAsync ( object serverGroup , CancellationToken cancellationToken = default ( CancellationToken ) )
1288+ {
1289+ if ( serverGroup == null )
1290+ throw new ArgumentNullException ( "serverGroup" ) ;
1291+
1292+ Url endpoint = await UrlBuilder . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
1293+
1294+ return endpoint
1295+ . AppendPathSegments ( "os-server-groups" )
1296+ . Authenticate ( AuthenticationProvider )
1297+ . SetMicroversion ( this )
1298+ . PreparePostJson ( serverGroup , cancellationToken ) ;
1299+ }
1300+
1301+ /// <summary />
1302+ public virtual async Task < T > ListServerGroupsAsync < T > ( CancellationToken cancellationToken = default ( CancellationToken ) )
1303+ where T : IEnumerable < IServiceResource >
1304+ {
1305+ var result = await BuildListServerGroupsAsync ( cancellationToken )
1306+ . SendAsync ( )
1307+ . ReceiveJson < T > ( ) ;
1308+ result . PropogateOwner ( this ) ;
1309+ return result ;
1310+ }
1311+
1312+ /// <summary />
1313+ public virtual async Task < PreparedRequest > BuildListServerGroupsAsync ( CancellationToken cancellationToken = default ( CancellationToken ) )
1314+ {
1315+ Url endpoint = await UrlBuilder . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
1316+
1317+ return endpoint
1318+ . AppendPathSegment ( "os-server-groups" )
1319+ . Authenticate ( AuthenticationProvider )
1320+ . SetMicroversion ( this )
1321+ . PrepareGet ( cancellationToken ) ;
1322+ }
1323+
1324+ /// <summary />
1325+ public virtual Task DeleteServerGroupAsync ( string serverGroupId , CancellationToken cancellationToken = default ( CancellationToken ) )
1326+ {
1327+ return BuildDeleteServerGroupAsync ( serverGroupId , cancellationToken ) . SendAsync ( ) ;
1328+ }
1329+
1330+ /// <summary />
1331+ public virtual async Task < PreparedRequest > BuildDeleteServerGroupAsync ( string serverGroupId , CancellationToken cancellationToken = default ( CancellationToken ) )
1332+ {
1333+ if ( serverGroupId == null )
1334+ throw new ArgumentNullException ( "serverGroupId" ) ;
1335+
1336+ Url endpoint = await UrlBuilder . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
1337+
1338+ return ( PreparedRequest ) endpoint
1339+ . AppendPathSegment ( $ "os-server-groups/{ serverGroupId } ")
1340+ . Authenticate ( AuthenticationProvider )
1341+ . SetMicroversion ( this )
1342+ . PrepareDelete ( cancellationToken )
1343+ . AllowHttpStatus ( HttpStatusCode . NotFound ) ;
1344+ }
1345+
1346+ #endregion
1347+
1348+ #region Volumes
1349+
1350+ /// <summary />
1351+ public virtual async Task < T > GetVolumeAsync < T > ( string volumeId , CancellationToken cancellationToken = default ( CancellationToken ) )
1352+ where T : IServiceResource
1353+ {
1354+ var result = await BuildGetVolumesAsync ( volumeId , cancellationToken )
1355+ . SendAsync ( )
1356+ . ReceiveJson < T > ( ) ;
1357+ result . PropogateOwner ( this ) ;
1358+ return result ;
1359+ }
1360+
1361+ /// <summary />
1362+ public virtual async Task < PreparedRequest > BuildGetVolumesAsync ( string volumeId , CancellationToken cancellationToken = default ( CancellationToken ) )
1363+ {
1364+ if ( volumeId == null )
1365+ throw new ArgumentNullException ( "volumeId" ) ;
1366+
1367+ Url endpoint = await UrlBuilder . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
1368+
1369+ return endpoint
1370+ . AppendPathSegment ( $ "os-volumes/{ volumeId } ")
1371+ . Authenticate ( AuthenticationProvider )
1372+ . SetMicroversion ( this )
1373+ . PrepareGet ( cancellationToken ) ;
1374+ }
1375+
1376+ /// <summary />
1377+ public virtual async Task < T > CreateVolumeAsync < T > ( object volume , CancellationToken cancellationToken = default ( CancellationToken ) )
1378+ where T : IServiceResource
1379+ {
1380+ var result = await BuildCreateVolumeAsync ( volume , cancellationToken ) . SendAsync ( ) . ReceiveJson < T > ( ) ;
1381+ result . PropogateOwner ( this ) ;
1382+ return result ;
1383+ }
1384+
1385+ /// <summary />
1386+ public virtual async Task < PreparedRequest > BuildCreateVolumeAsync ( object volume , CancellationToken cancellationToken = default ( CancellationToken ) )
1387+ {
1388+ if ( volume == null )
1389+ throw new ArgumentNullException ( "volume" ) ;
1390+
1391+ Url endpoint = await UrlBuilder . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
1392+
1393+ return endpoint
1394+ . AppendPathSegments ( "os-volumes" )
1395+ . Authenticate ( AuthenticationProvider )
1396+ . SetMicroversion ( this )
1397+ . PreparePostJson ( volume , cancellationToken ) ;
1398+ }
1399+
1400+ /// <summary />
1401+ public virtual async Task < T > ListVolumesAsync < T > ( CancellationToken cancellationToken = default ( CancellationToken ) )
1402+ where T : IEnumerable < IServiceResource >
1403+ {
1404+ var result = await BuildListVolumesAsync ( cancellationToken )
1405+ . SendAsync ( )
1406+ . ReceiveJson < T > ( ) ;
1407+ result . PropogateOwner ( this ) ;
1408+ return result ;
1409+ }
1410+
1411+ /// <summary />
1412+ public virtual async Task < PreparedRequest > BuildListVolumesAsync ( CancellationToken cancellationToken = default ( CancellationToken ) )
1413+ {
1414+ Url endpoint = await UrlBuilder . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
1415+
1416+ return endpoint
1417+ . AppendPathSegment ( "os-volumes" )
1418+ . Authenticate ( AuthenticationProvider )
1419+ . SetMicroversion ( this )
1420+ . PrepareGet ( cancellationToken ) ;
1421+ }
1422+
1423+ /// <summary />
1424+ public virtual Task DeleteVolumeAsync ( string volumeId , CancellationToken cancellationToken = default ( CancellationToken ) )
1425+ {
1426+ return BuildDeleteVolumeAsync ( volumeId , cancellationToken ) . SendAsync ( ) ;
1427+ }
1428+
1429+ /// <summary />
1430+ public virtual async Task < PreparedRequest > BuildDeleteVolumeAsync ( string volumeId , CancellationToken cancellationToken = default ( CancellationToken ) )
1431+ {
1432+ if ( volumeId == null )
1433+ throw new ArgumentNullException ( "volumeId" ) ;
1434+
1435+ Url endpoint = await UrlBuilder . GetEndpoint ( cancellationToken ) . ConfigureAwait ( false ) ;
1436+
1437+ return ( PreparedRequest ) endpoint
1438+ . AppendPathSegment ( $ "os-volumes/{ volumeId } ")
1439+ . Authenticate ( AuthenticationProvider )
1440+ . SetMicroversion ( this )
1441+ . PrepareDelete ( cancellationToken )
1442+ . AllowHttpStatus ( HttpStatusCode . NotFound ) ;
1443+ }
1444+
1445+ #endregion
1446+
12491447 #region Compute Service
12501448 /// <summary />
12511449 public virtual Task < T > GetLimitsAsync < T > ( CancellationToken cancellationToken = default ( CancellationToken ) )
0 commit comments