Skip to content

Commit 802c887

Browse files
[Communication]: Cleaned up ACS samples (#18656)
* Cleaned up ACS samples * Updated ACS account to ACS resource
1 parent 69e2e21 commit 802c887

9 files changed

+22
-14
lines changed

sdk/communication/azure-communication-identity/samples/identity_samples.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
USAGE:
1515
python identity_samples.py
1616
Set the environment variables with your own values before running the sample:
17-
2) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS account
18-
3) AZURE_CLIENT_ID - the client ID of your active directory application
19-
4) AZURE_CLIENT_SECRET - the secret of your active directory application
20-
5) AZURE_TENANT_ID - the tenant ID of your active directory application
17+
1) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS resource
18+
2) AZURE_CLIENT_ID - the client ID of your active directory application
19+
3) AZURE_CLIENT_SECRET - the secret of your active directory application
20+
4) AZURE_TENANT_ID - the tenant ID of your active directory application
2121
"""
2222
import os
2323
from azure.communication.identity._shared.utils import parse_connection_str

sdk/communication/azure-communication-identity/samples/identity_samples_async.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
python identity_samples_async.py
1616
Set the environment variables with your own values before running the sample:
1717
1) AZURE_COMMUNICATION_SERVICE_ENDPOINT - Communication Service endpoint url
18-
2) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS account
18+
2) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS resource
1919
3) AZURE_CLIENT_ID - the client ID of your active directory application
2020
4) AZURE_CLIENT_SECRET - the secret of your active directory application
2121
5) AZURE_TENANT_ID - the tenant ID of your active directory application

sdk/communication/azure-communication-phonenumbers/samples/purchase_phone_number_sample.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
python purchase_phone_number_sample.py
1515
Set the environment variables with your own values before running the sample:
1616
1) COMMUNICATION_SAMPLES_CONNECTION_STRING - The connection string including your endpoint and
17-
access key of your Azure Communication Service 2) AZURE_COMMUNICATION_SERVICE_SEARCH_ID_TO_PURCHASE - The search id for the phone number you reserved and want to purchase
17+
access key of your Azure Communication Service
18+
2) AZURE_COMMUNICATION_SERVICE_SEARCH_ID_TO_PURCHASE - The search id for the phone number you
19+
reserved and want to purchase
1820
"""
1921

2022
import os

sdk/communication/azure-communication-sms/samples/send_sms_to_multiple_recipients_sample.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
USAGE:
1515
python send_sms_to_multiple_recipients_sample.py
1616
Set the environment variable with your own value before running the sample:
17-
1) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS account
17+
1) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS resource
18+
2) AZURE_COMMUNICATION_SERVICE_PHONE_NUMBER - a phone number with SMS capabilities in your ACS resource
1819
"""
1920

2021
import os

sdk/communication/azure-communication-sms/samples/send_sms_to_multiple_recipients_sample_async.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
USAGE:
1515
python send_sms_to_multiple_recipients_sample_async.py
1616
Set the environment variable with your own value before running the sample:
17-
1) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS account
17+
1) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS resource
18+
2) AZURE_COMMUNICATION_SERVICE_PHONE_NUMBER - a phone number with SMS capabilities in your ACS resource
1819
"""
1920

2021
import os
@@ -37,7 +38,7 @@ async def send_sms_to_multiple_recipients_async(self):
3738
# calling send() with sms values
3839
sms_responses = await sms_client.send(
3940
from_=self.phone_number,
40-
to=[self.phone_number,self.phone_number],
41+
to=[self.phone_number, self.phone_number],
4142
message="Hello World via SMS",
4243
enable_delivery_report=True, # optional property
4344
tag="custom-tag") # optional property

sdk/communication/azure-communication-sms/samples/send_sms_to_single_recipient_sample.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
USAGE:
1515
python send_sms_to_single_recipient_sample.py
1616
Set the environment variable with your own value before running the sample:
17-
1) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS account
17+
1) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS resource
18+
2) AZURE_COMMUNICATION_SERVICE_PHONE_NUMBER - a phone number with SMS capabilities in your ACS resource
1819
"""
1920

2021
import os

sdk/communication/azure-communication-sms/samples/send_sms_to_single_recipient_sample_async.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
USAGE:
1515
python send_sms_to_single_recipient_sample_async.py
1616
Set the environment variable with your own value before running the sample:
17-
1) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS account
17+
1) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS resource
18+
2) AZURE_COMMUNICATION_SERVICE_PHONE_NUMBER - a phone number with SMS capabilities in your ACS resource
1819
"""
1920

2021
import os

sdk/communication/azure-communication-sms/samples/sms_token_credential_auth_sample.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
USAGE:
1515
python sms_token_credential_auth_sample.py
1616
Set the environment variable with your own value before running the sample:
17-
1) AZURE_COMMUNICATION_SERVICE_CONNECTION_STRING - the connection string in your ACS account
17+
1) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS resource
18+
2) AZURE_COMMUNICATION_SERVICE_PHONE_NUMBER - a phone number with SMS capabilities in your ACS resource
1819
"""
1920

2021
import os
@@ -27,7 +28,7 @@
2728

2829
class SmsTokenCredentialAuthSample(object):
2930

30-
connection_str = os.getenv('AZURE_COMMUNICATION_SERVICE_CONNECTION_STRING')
31+
connection_str = os.getenv('COMMUNICATION_SAMPLES_CONNECTION_STRING')
3132
phone_number = os.getenv("AZURE_COMMUNICATION_SERVICE_PHONE_NUMBER")
3233

3334
def sms_token_credential_auth(self):

sdk/communication/azure-communication-sms/samples/sms_token_credential_auth_sample_async.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
USAGE:
1515
python sms_token_credential_auth_sample_async.py
1616
Set the environment variable with your own value before running the sample:
17-
1) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS account
17+
1) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS resource
18+
2) AZURE_COMMUNICATION_SERVICE_PHONE_NUMBER - a phone number with SMS capabilities in your ACS resource
1819
"""
1920

2021
import os

0 commit comments

Comments
 (0)