Skip to content

Commit b31696c

Browse files
authored
Merge pull request #6466 from MicrosoftDocs/repo_sync_working_branch
Confirm merge from repo_sync_working_branch to main to sync with https://github.com/MicrosoftDocs/azure-ai-docs (branch main)
2 parents 0cddaa2 + 8268ed9 commit b31696c

File tree

2 files changed

+15
-17
lines changed

2 files changed

+15
-17
lines changed

articles/ai-services/document-intelligence/quickstarts/includes/java-sdk.md

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -264,9 +264,11 @@ Extract text, selection marks, text styles, table structures, and bounding regio
264264

265265
```java
266266

267-
import com.azure.ai.documentintelligence.models.AnalyzeDocumentRequest;
267+
import com.azure.ai.documentintelligence.DocumentIntelligenceClient;
268+
import com.azure.ai.documentintelligence.DocumentIntelligenceClientBuilder;
269+
import com.azure.ai.documentintelligence.models.AnalyzeDocumentOptions;
270+
import com.azure.ai.documentintelligence.models.AnalyzeOperationDetails;
268271
import com.azure.ai.documentintelligence.models.AnalyzeResult;
269-
import com.azure.ai.documentintelligence.models.AnalyzeResultOperation;
270272
import com.azure.ai.documentintelligence.models.DocumentTable;
271273
import com.azure.core.credential.AzureKeyCredential;
272274
import com.azure.core.util.polling.SyncPoller;
@@ -291,17 +293,11 @@ public class DocIntelligence {
291293
String modelId = "prebuilt-layout";
292294
String documentUrl = "https://raw.githubusercontent.com/Azure-Samples/cognitive-services-REST-api-samples/master/curl/form-recognizer/sample-layout.pdf";
293295

294-
SyncPoller <AnalyzeResultOperation, AnalyzeResultOperation> analyzeLayoutPoller =
295-
client.beginAnalyzeDocument(modelId,
296-
null,
297-
null,
298-
null,
299-
null,
300-
null,
301-
null,
302-
new AnalyzeDocumentRequest().setUrlSource(documentUrl));
296+
AnalyzeDocumentOptions options = new AnalyzeDocumentOptions(documentUrl);
303297

304-
AnalyzeResult analyzeLayoutResult = analyzeLayoutPoller.getFinalResult().getAnalyzeResult();
298+
SyncPoller<AnalyzeOperationDetails, AnalyzeResult> analyzeLayoutPoller = client.beginAnalyzeDocument(modelId, options);
299+
300+
AnalyzeResult analyzeLayoutResult = analyzeLayoutPoller.getFinalResult();
305301

306302
// pages
307303
analyzeLayoutResult.getPages().forEach(documentPage -> {
@@ -336,16 +332,14 @@ public class DocIntelligence {
336332
DocumentTable documentTable = tables.get(i);
337333
System.out.printf("Table %d has %d rows and %d columns.%n", i, documentTable.getRowCount(),
338334
documentTable.getColumnCount());
339-
documentTable.getCells().forEach(documentTableCell -> {
335+
documentTable.getCells().forEach(documentTableCell ->
340336
System.out.printf("Cell '%s', has row index %d and column index %d.%n", documentTableCell.getContent(),
341-
documentTableCell.getRowIndex(), documentTableCell.getColumnIndex());
342-
});
337+
documentTableCell.getRowIndex(), documentTableCell.getColumnIndex()));
343338
System.out.println();
344339
}
345340

346341
// styles
347-
analyzeLayoutResult.getStyles().forEach(documentStyle -
348-
> System.out.printf("Document is handwritten %s.%n", documentStyle.isHandwritten()));
342+
analyzeLayoutResult.getStyles().forEach(documentStyle -> System.out.printf("Document is handwritten %s.%n", documentStyle.isHandwritten()));
349343
}
350344
}
351345

articles/machine-learning/how-to-configure-private-link.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,10 @@ You can also enable public network access by using a YAML file. For more informa
310310

311311
You can use IP network rules to allow access to your workspace and endpoint from specific public internet IP address ranges by creating IP network rules. Each Azure Machine Learning workspace supports up to 200 rules. These rules grant access to specific internet-based services and on-premises networks and block general internet traffic.
312312

313+
> [!IMPORTANT]
314+
> * Before creating a compute instance in an Azure Machine Learning workspace with a selected IP address, ensure that your workspace has network isolation configured using a [workspace-managed virtual network](how-to-managed-network.md) OR [Add a private endpoint to your workspace in your own virtual network](how-to-configure-private-link.md#add-a-private-endpoint-to-a-workspace).
315+
> * Configuring only the selected IP without enabling a managed virtual network or a Private endpoint for the workspace can lead to failures while provisioning the compute instance.
316+
313317
> [!WARNING]
314318
> * Enable your endpoint's [public network access flag](concept-secure-online-endpoint.md#secure-inbound-scoring-requests) if you want to allow access to your endpoint from specific public internet IP address ranges.
315319
> * You can only use IPv4 addresses.

0 commit comments

Comments
 (0)