diff --git a/sdk/communication/CONTRIBUTING.md b/sdk/communication/CONTRIBUTING.md index 49ab8464bee9..1f5b9f3e42c3 100644 --- a/sdk/communication/CONTRIBUTING.md +++ b/sdk/communication/CONTRIBUTING.md @@ -27,7 +27,7 @@ If the tests are successful, we can proceed to run the tests in LIVE mode. ### Live mode -Because in LIVE mode we are hitting an actual resource, we must set the appropriate environment variable to make sure the code tests against the resource we want. Set up an env variable called `AZURE_COMMUNICATION_SERVICE_CONNECTION_STRING` and set it to the connection string of the resource you want to test against. +Because in LIVE mode we are hitting an actual resource, we must set the appropriate environment variable to make sure the code tests against the resource we want. Set up an env variable called `COMMUNICATION_LIVETEST_STATIC_CONNECTION_STRING` (just needed for SMS and Phone Numbers SDKs) and set it to the connection string of the resource you want to test against. Depending on which package you are testing, it may need special environment variables to test succesfully. The names of these variables can be found inside each test file in the `setUp()` function. Make sure to set these variables before running the tests themselves. You may need to restart your development environment after creating or updating these environment variables. diff --git a/sdk/communication/azure-communication-chat/README.md b/sdk/communication/azure-communication-chat/README.md index ebb28955583c..cf00c1983816 100644 --- a/sdk/communication/azure-communication-chat/README.md +++ b/sdk/communication/azure-communication-chat/README.md @@ -544,7 +544,7 @@ to create a resource, then set some Environment Variables ```bash set AZURE_COMMUNICATION_SERVICE_ENDPOINT="https://.communcationservices.azure.com" -set AZURE_COMMUNICATION_SERVICE_CONNECTION_STRING="" +set COMMUNICATION_SAMPLES_CONNECTION_STRING="" pip install azure-communication-identity diff --git a/sdk/communication/azure-communication-identity/README.md b/sdk/communication/azure-communication-identity/README.md index 344a2ab502ca..171dfc910b77 100644 --- a/sdk/communication/azure-communication-identity/README.md +++ b/sdk/communication/azure-communication-identity/README.md @@ -32,8 +32,8 @@ import os from azure.communication.identity import CommunicationIdentityClient from azure.identity import DefaultAzureCredential -connection_str = os.getenv('AZURE_COMMUNICATION_SERVICE_CONNECTION_STRING') -endpoint = os.getenv('AZURE_COMMUNICATION_SERVICE_ENDPOINT') +connection_str = "endpoint=ENDPOINT;accessKey=KEY" +endpoint = "https://.communication.azure.com" # To use Azure Active Directory Authentication (DefaultAzureCredential) make sure to have # AZURE_TENANT_ID, AZURE_CLIENT_ID and AZURE_CLIENT_SECRET as env variables. diff --git a/sdk/communication/azure-communication-phonenumbers/README.md b/sdk/communication/azure-communication-phonenumbers/README.md index cae95a135399..782884bc37a2 100644 --- a/sdk/communication/azure-communication-phonenumbers/README.md +++ b/sdk/communication/azure-communication-phonenumbers/README.md @@ -23,8 +23,7 @@ import os from azure.communication.phonenumbers import PhoneNumbersClient from azure.identity import DefaultAzureCredential -endpoint = os.getenv('AZURE_COMMUNICATION_SERVICE_CONNECTION_STRING') - +endpoint = "https://.communication.azure.com" # To use Azure Active Directory Authentication (DefaultAzureCredential) make sure to have your # AZURE_TENANT_ID, AZURE_CLIENT_ID and AZURE_CLIENT_SECRET as env variables. phone_numbers_client = PhoneNumbersClient(endpoint, DefaultAzureCredential()) @@ -38,7 +37,7 @@ Connection string authentication is also available for Phone Numbers Client. import os from azure.communication.phonenumbers import PhoneNumbersClient -connection_str = os.getenv('AZURE_COMMUNICATION_SERVICE_CONNECTION_STRING') +connection_str = "endpoint=ENDPOINT;accessKey=KEY" phone_numbers_client = PhoneNumbersClient.from_connection_string(connection_str) ``` diff --git a/sdk/communication/azure-communication-sms/README.md b/sdk/communication/azure-communication-sms/README.md index 14c5837bd7c2..0c56c1949704 100644 --- a/sdk/communication/azure-communication-sms/README.md +++ b/sdk/communication/azure-communication-sms/README.md @@ -46,11 +46,12 @@ Alternatively, you can also use Active Directory authentication using DefaultAzu from azure.communication.sms import SmsClient from azure.identity import DefaultAzureCredential -connection_string = os.getenv('AZURE_COMMUNICATION_SERVICE_CONNECTION_STRING') +connection_str = "endpoint=ENDPOINT;accessKey=KEY" sms_client = SmsClient.from_connection_string(connection_string) + # To use Azure Active Directory Authentication (DefaultAzureCredential) make sure to have # AZURE_TENANT_ID, AZURE_CLIENT_ID and AZURE_CLIENT_SECRET as env variables. -endpoint = os.getenv('AZURE_COMMUNICATION_SERVICE_ENDPOINT') +endpoint = "https://.communication.azure.com" sms_client = SmsClient(endpoint, DefaultAzureCredential()) ```