Skip to content

Commit 9520815

Browse files
committed
rename env vars with face prefix
1 parent 3f3f65a commit 9520815

File tree

3 files changed

+44
-44
lines changed

3 files changed

+44
-44
lines changed

articles/ai-services/computer-vision/Tutorials/liveness.md

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ The high-level steps involved in liveness orchestration are illustrated below:
8787

8888
#### [C#](#tab/csharp)
8989
```csharp
90-
var endpoint = new Uri(System.Environment.GetEnvironmentVariable("VISION_ENDPOINT"));
91-
var credential = new AzureKeyCredential(System.Environment.GetEnvironmentVariable("VISION_KEY"));
90+
var endpoint = new Uri(System.Environment.GetEnvironmentVariable("FACE_ENDPOINT"));
91+
var credential = new AzureKeyCredential(System.Environment.GetEnvironmentVariable("FACE_APIKEY"));
9292

9393
var sessionClient = new FaceSessionClient(endpoint, credential);
9494

@@ -107,8 +107,8 @@ The high-level steps involved in liveness orchestration are illustrated below:
107107

108108
#### [Java](#tab/java)
109109
```java
110-
String endpoint = System.getenv("VISION_ENDPOINT");
111-
String accountKey = System.getenv("VISION_KEY");
110+
String endpoint = System.getenv("FACE_ENDPOINT");
111+
String accountKey = System.getenv("FACE_APIKEY");
112112

113113
FaceSessionClient sessionClient = new FaceSessionClientBuilder()
114114
.endpoint(endpoint)
@@ -127,8 +127,8 @@ The high-level steps involved in liveness orchestration are illustrated below:
127127

128128
#### [Python](#tab/python)
129129
```python
130-
endpoint = os.environ["VISION_ENDPOINT"]
131-
key = os.environ["VISION_KEY"]
130+
endpoint = os.environ["FACE_ENDPOINT"]
131+
key = os.environ["FACE_APIKEY"]
132132

133133
face_session_client = FaceSessionClient(endpoint=endpoint, credential=AzureKeyCredential(key))
134134

@@ -171,8 +171,8 @@ The high-level steps involved in liveness orchestration are illustrated below:
171171

172172
#### [REST API (Windows)](#tab/cmd)
173173
```console
174-
curl --request POST --location "%VISION_ENDPOINT%/face/v1.1-preview.1/detectliveness/singlemodal/sessions" ^
175-
--header "Ocp-Apim-Subscription-Key: %VISION_KEY%" ^
174+
curl --request POST --location "%FACE_ENDPOINT%/face/v1.1-preview.1/detectliveness/singlemodal/sessions" ^
175+
--header "Ocp-Apim-Subscription-Key: %FACE_APIKEY%" ^
176176
--header "Content-Type: application/json" ^
177177
--data ^
178178
"{ ^
@@ -184,8 +184,8 @@ The high-level steps involved in liveness orchestration are illustrated below:
184184

185185
#### [REST API (Linux)](#tab/bash)
186186
```bash
187-
curl --request POST --location "${VISION_ENDPOINT}/face/v1.1-preview.1/detectliveness/singlemodal/sessions" \
188-
--header "Ocp-Apim-Subscription-Key: ${VISION_KEY}" \
187+
curl --request POST --location "${FACE_ENDPOINT}/face/v1.1-preview.1/detectliveness/singlemodal/sessions" \
188+
--header "Ocp-Apim-Subscription-Key: ${FACE_APIKEY}" \
189189
--header "Content-Type: application/json" \
190190
--data \
191191
'{
@@ -303,14 +303,14 @@ The high-level steps involved in liveness orchestration are illustrated below:
303303

304304
#### [REST API (Windows)](#tab/cmd)
305305
```console
306-
curl --request GET --location "%VISION_ENDPOINT%/face/v1.1-preview.1/detectliveness/singlemodal/sessions/<session-id>" ^
307-
--header "Ocp-Apim-Subscription-Key: %VISION_KEY%"
306+
curl --request GET --location "%FACE_ENDPOINT%/face/v1.1-preview.1/detectliveness/singlemodal/sessions/<session-id>" ^
307+
--header "Ocp-Apim-Subscription-Key: %FACE_APIKEY%"
308308
```
309309

310310
#### [REST API (Linux)](#tab/bash)
311311
```bash
312-
curl --request GET --location "${VISION_ENDPOINT}/face/v1.1-preview.1/detectliveness/singlemodal/sessions/<session-id>" \
313-
--header "Ocp-Apim-Subscription-Key: ${VISION_KEY}"
312+
curl --request GET --location "${FACE_ENDPOINT}/face/v1.1-preview.1/detectliveness/singlemodal/sessions/<session-id>" \
313+
--header "Ocp-Apim-Subscription-Key: ${FACE_APIKEY}"
314314
```
315315

316316
---
@@ -394,14 +394,14 @@ The high-level steps involved in liveness orchestration are illustrated below:
394394

395395
#### [REST API (Windows)](#tab/cmd)
396396
```console
397-
curl --request DELETE --location "%VISION_ENDPOINT%/face/v1.1-preview.1/detectliveness/singlemodal/sessions/<session-id>" ^
398-
--header "Ocp-Apim-Subscription-Key: %VISION_KEY%"
397+
curl --request DELETE --location "%FACE_ENDPOINT%/face/v1.1-preview.1/detectliveness/singlemodal/sessions/<session-id>" ^
398+
--header "Ocp-Apim-Subscription-Key: %FACE_APIKEY%"
399399
```
400400

401401
#### [REST API (Linux)](#tab/bash)
402402
```bash
403-
curl --request DELETE --location "${VISION_ENDPOINT}/face/v1.1-preview.1/detectliveness/singlemodal/sessions/<session-id>" \
404-
--header "Ocp-Apim-Subscription-Key: ${VISION_KEY}"
403+
curl --request DELETE --location "${FACE_ENDPOINT}/face/v1.1-preview.1/detectliveness/singlemodal/sessions/<session-id>" \
404+
--header "Ocp-Apim-Subscription-Key: ${FACE_APIKEY}"
405405
```
406406

407407
---
@@ -443,8 +443,8 @@ The high-level steps involved in liveness with verification orchestration are il
443443
444444
#### [C#](#tab/csharp)
445445
```csharp
446-
var endpoint = new Uri(System.Environment.GetEnvironmentVariable("VISION_ENDPOINT"));
447-
var credential = new AzureKeyCredential(System.Environment.GetEnvironmentVariable("VISION_KEY"));
446+
var endpoint = new Uri(System.Environment.GetEnvironmentVariable("FACE_ENDPOINT"));
447+
var credential = new AzureKeyCredential(System.Environment.GetEnvironmentVariable("FACE_APIKEY"));
448448

449449
var sessionClient = new FaceSessionClient(endpoint, credential);
450450

@@ -467,8 +467,8 @@ The high-level steps involved in liveness with verification orchestration are il
467467

468468
#### [Java](#tab/java)
469469
```java
470-
String endpoint = System.getenv("VISION_ENDPOINT");
471-
String accountKey = System.getenv("VISION_KEY");
470+
String endpoint = System.getenv("FACE_ENDPOINT");
471+
String accountKey = System.getenv("FACE_APIKEY");
472472

473473
FaceSessionClient sessionClient = new FaceSessionClientBuilder()
474474
.endpoint(endpoint)
@@ -493,8 +493,8 @@ The high-level steps involved in liveness with verification orchestration are il
493493

494494
#### [Python](#tab/python)
495495
```python
496-
endpoint = os.environ["VISION_ENDPOINT"]
497-
key = os.environ["VISION_KEY"]
496+
endpoint = os.environ["FACE_ENDPOINT"]
497+
key = os.environ["FACE_APIKEY"]
498498

499499
face_session_client = FaceSessionClient(endpoint=endpoint, credential=AzureKeyCredential(key))
500500

@@ -558,16 +558,16 @@ The high-level steps involved in liveness with verification orchestration are il
558558

559559
#### [REST API (Windows)](#tab/cmd)
560560
```console
561-
curl --request POST --location "%VISION_ENDPOINT%/face/v1.1-preview.1/detectlivenesswithverify/singlemodal/sessions" ^
562-
--header "Ocp-Apim-Subscription-Key: %VISION_KEY%" ^
561+
curl --request POST --location "%FACE_ENDPOINT%/face/v1.1-preview.1/detectlivenesswithverify/singlemodal/sessions" ^
562+
--header "Ocp-Apim-Subscription-Key: %FACE_APIKEY%" ^
563563
--form "Parameters=""{\\\""livenessOperationMode\\\"": \\\""passive\\\"", \\\""deviceCorrelationId\\\"": \\\""723d6d03-ef33-40a8-9682-23a1feb7bccd\\\""}""" ^
564564
--form "VerifyImage=@""test.png"""
565565
```
566566

567567
#### [REST API (Linux)](#tab/bash)
568568
```bash
569-
curl --request POST --location "${VISION_ENDPOINT}/face/v1.1-preview.1/detectlivenesswithverify/singlemodal/sessions" \
570-
--header "Ocp-Apim-Subscription-Key: ${VISION_KEY}" \
569+
curl --request POST --location "${FACE_ENDPOINT}/face/v1.1-preview.1/detectlivenesswithverify/singlemodal/sessions" \
570+
--header "Ocp-Apim-Subscription-Key: ${FACE_APIKEY}" \
571571
--form 'Parameters="{
572572
\"livenessOperationMode\": \"passive\",
573573
\"deviceCorrelationId\": \"723d6d03-ef33-40a8-9682-23a1feb7bccd\"
@@ -693,14 +693,14 @@ The high-level steps involved in liveness with verification orchestration are il
693693

694694
#### [REST API (Windows)](#tab/cmd)
695695
```console
696-
curl --request GET --location "%VISION_ENDPOINT%/face/v1.1-preview.1/detectlivenesswithverify/singlemodal/sessions/<session-id>" ^
697-
--header "Ocp-Apim-Subscription-Key: %VISION_KEY%"
696+
curl --request GET --location "%FACE_ENDPOINT%/face/v1.1-preview.1/detectlivenesswithverify/singlemodal/sessions/<session-id>" ^
697+
--header "Ocp-Apim-Subscription-Key: %FACE_APIKEY%"
698698
```
699699

700700
#### [REST API (Linux)](#tab/bash)
701701
```bash
702-
curl --request GET --location "${VISION_ENDPOINT}/face/v1.1-preview.1/detectlivenesswithverify/singlemodal/sessions/<session-id>" \
703-
--header "Ocp-Apim-Subscription-Key: ${VISION_KEY}"
702+
curl --request GET --location "${FACE_ENDPOINT}/face/v1.1-preview.1/detectlivenesswithverify/singlemodal/sessions/<session-id>" \
703+
--header "Ocp-Apim-Subscription-Key: ${FACE_APIKEY}"
704704
```
705705

706706
---
@@ -788,14 +788,14 @@ The high-level steps involved in liveness with verification orchestration are il
788788

789789
#### [REST API (Windows)](#tab/cmd)
790790
```console
791-
curl --request DELETE --location "%VISION_ENDPOINT%/face/v1.1-preview.1/detectlivenesswithverify/singlemodal/sessions/<session-id>" ^
792-
--header "Ocp-Apim-Subscription-Key: %VISION_KEY%"
791+
curl --request DELETE --location "%FACE_ENDPOINT%/face/v1.1-preview.1/detectlivenesswithverify/singlemodal/sessions/<session-id>" ^
792+
--header "Ocp-Apim-Subscription-Key: %FACE_APIKEY%"
793793
```
794794

795795
#### [REST API (Linux)](#tab/bash)
796796
```bash
797-
curl --request DELETE --location "${VISION_ENDPOINT}/face/v1.1-preview.1/detectlivenesswithverify/singlemodal/sessions/<session-id>" \
798-
--header "Ocp-Apim-Subscription-Key: ${VISION_KEY}"
797+
curl --request DELETE --location "${FACE_ENDPOINT}/face/v1.1-preview.1/detectlivenesswithverify/singlemodal/sessions/<session-id>" \
798+
--header "Ocp-Apim-Subscription-Key: ${FACE_APIKEY}"
799799
```
800800

801801
---

articles/ai-services/computer-vision/includes/environment-variables.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ In this example, write your credentials to environment variables on the local ma
1717
1818
To set the environment variable for your key and endpoint, open a console window and follow the instructions for your operating system and development environment.
1919

20-
1. To set the `VISION_KEY` environment variable, replace `your-key` with one of the keys for your resource.
21-
2. To set the `VISION_ENDPOINT` environment variable, replace `your-endpoint` with the endpoint for your resource.
20+
1. To set the `VISION_KEY` environment variable, replace `<your_key>` with one of the keys for your resource.
21+
2. To set the `VISION_ENDPOINT` environment variable, replace `<your_endpoint>` with the endpoint for your resource.
2222

2323
#### [Windows](#tab/windows)
2424

articles/ai-services/computer-vision/includes/face-environment-variables.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,29 @@ In this example, write your credentials to environment variables on the local ma
1515
1616
To set the environment variable for your key and endpoint, open a console window and follow the instructions for your operating system and development environment.
1717

18-
1. To set the `VISION_KEY` environment variable, replace `your-key` with one of the keys for your resource.
19-
2. To set the `VISION_ENDPOINT` environment variable, replace `your-endpoint` with the endpoint for your resource.
18+
1. To set the `FACE_APIKEY` environment variable, replace `<your_key>` with one of the keys for your resource.
19+
2. To set the `FACE_ENDPOINT` environment variable, replace `<your_endpoint>` with the endpoint for your resource.
2020

2121
#### [Windows](#tab/windows)
2222

2323
```console
24-
setx VISION_KEY your-key
24+
setx FACE_APIKEY <your_key>
2525
```
2626

2727
```console
28-
setx VISION_ENDPOINT your-endpoint
28+
setx FACE_ENDPOINT <your_endpoint>
2929
```
3030

3131
After you add the environment variables, you may need to restart any running programs that will read the environment variables, including the console window.
3232

3333
#### [Linux](#tab/linux)
3434

3535
```bash
36-
export VISION_KEY=your-key
36+
export FACE_APIKEY=<your_key>
3737
```
3838

3939
```bash
40-
export VISION_ENDPOINT=your-endpoint
40+
export FACE_ENDPOINT=<your_endpoint>
4141
```
4242

4343
After you add the environment variables, run `source ~/.bashrc` from your console window to make the changes effective.

0 commit comments

Comments
 (0)