@@ -72,13 +72,6 @@ Familiarity with the legacy client library is assumed. For those new to the Azur
7272 - [ File Properties] ( #get-node-file-properties )
7373 - [ GetRemoteLoginSettings] ( #getremoteloginsettings )
7474 - [ UploadComputeNodeBatchServiceLogs] ( #uploadcomputenodebatchservicelogs )
75- - [ Certificate Operations] ( #certificate-operations )
76- - [ CreateCertificateFromCer] ( #createcertificatefromcer )
77- - [ CreateCertificateFromPfx] ( #createcertificatefrompfx )
78- - [ GetCertificate] ( #getcertificate )
79- - [ ListCertificates] ( #listcertificates )
80- - [ DeleteCertificate] ( #deletecertificate )
81- - [ CancelDeleteCertificate] ( #canceldeletecertificate )
8275 - [ Application Operations] ( #application-operations )
8376 - [ GetApplicationSummary] ( #getapplicationsummary )
8477 - [ ListApplicationSummaries] ( #listapplicationsummaries )
@@ -522,15 +515,7 @@ BatchApplicationPackageReference[] batchApplicationPackageReferences = new Batch
522515 }
523516 };
524517
525- BatchCertificateReference [] certificateReferences = new BatchCertificateReference [] {
526- new BatchCertificateReference (" thumbprint" ," thumbprintAlgorithm" )
527- {
528- StoreLocation = " storeLocation" ,
529- StoreName = " storeName"
530- }
531- };
532-
533- BatchPoolReplaceOptions replaceOptions = new BatchPoolReplaceOptions (certificateReferences , batchApplicationPackageReferences , metadataItems );
518+ BatchPoolReplaceOptions replaceOptions = new BatchPoolReplaceOptions (batchApplicationPackageReferences , metadataItems );
534519batchClient .ReplacePoolProperties (" poolID" , replaceOptions );
535520```
536521#### ResizePool
@@ -1658,141 +1643,6 @@ UploadBatchServiceLogsOptions uploadBatchServiceLogsOptions = new UploadBatchSer
16581643UploadBatchServiceLogsResult uploadBatchServiceLogsResult = batchClient .UploadNodeLogs (" poolId" , " computeNodeId" , uploadBatchServiceLogsOptions );
16591644```
16601645
1661- ### Certificate Operations
1662-
1663- > Note: Certificates has been [ deprecated] .
1664-
1665- #### CreateCertificateFromCer
1666-
1667- Previously in ` Microsoft.Azure.Batch ` to create a Certificate from an existing cert you could call the ` CreateCertificateFromCer ` method with the path to the cert.
1668-
1669- ``` C#
1670- Certificate cerCertificate = batchClient .CertificateOperations .CreateCertificateFromCer (" cerFilePath" );
1671- ```
1672-
1673- With ` Azure.Compute.Batch ` call ` CreateCertificate ` with a ` BatchCertificate ` param to create a cert
1674-
1675- ``` C# Snippet:Batch_Migration_CreateCerCertificate
1676- BatchClient batchClient = new BatchClient (
1677- new Uri (" https://<your account>.eastus.batch.azure.com" ), new DefaultAzureCredential ());
1678- byte [] certData = File .ReadAllBytes (" certPath" );
1679- BatchCertificate cerCertificate = new BatchCertificate (" Thumbprint" , " ThumbprintAlgorithm" , BinaryData .FromBytes (certData ))
1680- {
1681- CertificateFormat = BatchCertificateFormat .Cer ,
1682- Password = " " ,
1683- };
1684-
1685- Response response = batchClient .CreateCertificate (cerCertificate );
1686- ```
1687-
1688- #### CreateCertificateFromPfx
1689-
1690- Previously in ` Microsoft.Azure.Batch ` to create a Certificate from an existing pfx cert you could call the ` CreateCertificateFromPfx ` method with the path to the cert.
1691-
1692- ``` C#
1693- Certificate pfxCertificate = batchClient .CertificateOperations .CreateCertificateFromPfx (" pfxFilePath" , " CertificatePassword" );
1694- ```
1695-
1696- With ` Azure.Compute.Batch ` call ` CreateCertificate ` with a ` BatchCertificate ` param to create a cert
1697-
1698- ``` C# Snippet:Batch_Migration_CreatePfxCertificate
1699- BatchClient batchClient = new BatchClient (
1700- new Uri (" https://<your account>.eastus.batch.azure.com" ), new DefaultAzureCredential ());
1701-
1702- byte [] certData = File .ReadAllBytes (" certPath" );
1703- BatchCertificate cerCertificate = new BatchCertificate (" Thumbprint" , " ThumbprintAlgorithm" , BinaryData .FromBytes (certData ))
1704- {
1705- CertificateFormat = BatchCertificateFormat .Pfx ,
1706- Password = " password" ,
1707- };
1708-
1709- Response response = batchClient .CreateCertificate (cerCertificate );
1710- ```
1711-
1712- #### GetCertificate
1713-
1714- Previously in ` Microsoft.Azure.Batch ` to get a Certificate you could call the ` GetCertificate ` method from ` CertificateOperations ` .
1715-
1716- ``` C#
1717- Certificate boundCert = batchClient .CertificateOperations .GetCertificate ( " ThumbprintAlgorithm" , " Thumbprint" )
1718- ```
1719-
1720- With `Azure .Compute .Batch ` call `GetCertificate ` to get the certificate which will return a `GetCertificateResponse `.
1721-
1722- ```C # Snippet : Batch_Migration_GetCertificate
1723- BatchClient batchClient = new BatchClient (
1724- new Uri (" https://<your account>.eastus.batch.azure.com" ), new DefaultAzureCredential ());
1725-
1726- BatchCertificate cerCertificateResponse = batchClient .GetCertificate (" ThumbprintAlgorithm" , " Thumbprint" );
1727- ```
1728-
1729- #### ListCertificates
1730-
1731- Previously in ` Microsoft.Azure.Batch ` to get a list of Certificates you could call the ` ListCertificates ` method from ` CertificateOperations ` .
1732-
1733- ``` C#
1734- foreach (Certificate curCert in batchClient .CertificateOperations .ListCertificates ())
1735- {
1736- // do something
1737- }
1738- ```
1739-
1740- With ` Azure.Compute.Batch ` call ` GetCertificates ` to get a list of certificates.
1741-
1742- ``` C# Snippet:Batch_Migration_ListCertificate
1743- BatchClient batchClient = new BatchClient (
1744- new Uri (" https://<your account>.eastus.batch.azure.com" ), new DefaultAzureCredential ());
1745-
1746- foreach (BatchCertificate item in batchClient .GetCertificates ())
1747- {
1748- // do something
1749- }
1750- ```
1751-
1752- #### DeleteCertificate
1753-
1754- Previously in ` Microsoft.Azure.Batch ` to delete a Certificate you could call the ` DeleteCertificate ` method from ` CertificateOperations ` .
1755-
1756- ``` C#
1757- batchClient .CertificateOperations .DeleteCertificate (" ThumbprintAlgorithm" , " Thumbprint" );
1758- ```
1759-
1760- With ` Azure.Compute.Batch ` call ` DeleteCertificate ` to delete a certificate.
1761-
1762- ``` C# Snippet:Batch_Migration_DeleteCertificate
1763- BatchClient batchClient = new BatchClient (
1764- new Uri (" https://<your account>.eastus.batch.azure.com" ), new DefaultAzureCredential ());
1765-
1766- batchClient .DeleteCertificate (" ThumbprintAlgorithm" , " Thumbprint" );
1767- ```
1768- Optionally you can use the returned ` DeleteCertificateOperation ` object to wait for the operation to complete.
1769-
1770- ``` C# Snippet:Batch_Migration_DeleteCertificate_Operation
1771- BatchClient batchClient = new BatchClient (
1772- new Uri (" https://<your account>.eastus.batch.azure.com" ), new DefaultAzureCredential ());
1773-
1774- DeleteCertificateOperation operation = batchClient .DeleteCertificate (" ThumbprintAlgorithm" , " Thumbprint" );
1775-
1776- // Optional, wait for operation to complete
1777- operation .WaitForCompletion ();
1778- ```
1779- #### CancelDeleteCertificate
1780-
1781- Previously in ` Microsoft.Azure.Batch ` to cancel a delete of a Certificate you could call the ` CancelDeleteCertificate ` method from ` CertificateOperations ` .
1782-
1783- ``` C#
1784- batchClient .CertificateOperations .CancelDeleteCertificate (" ThumbprintAlgorithm" , " Thumbprint" );
1785- ```
1786-
1787- With ` Azure.Compute.Batch ` call ` CancelCertificateDeletion ` to cancel a delete of a certificate.
1788-
1789- ``` C# Snippet:Batch_Migration_CancelDeleteCertificate
1790- BatchClient batchClient = new BatchClient (
1791- new Uri (" https://<your account>.eastus.batch.azure.com" ), new DefaultAzureCredential ());
1792-
1793- batchClient .CancelCertificateDeletion (" ThumbprintAlgorithm" , " Thumbprint" );
1794- ```
1795-
17961646### Application Operations
17971647
17981648#### GetApplicationSummary
0 commit comments