diff --git a/scripts/ci/credscan/CredScanSuppressions.json b/scripts/ci/credscan/CredScanSuppressions.json index d150be203f2..6984b7b9d86 100644 --- a/scripts/ci/credscan/CredScanSuppressions.json +++ b/scripts/ci/credscan/CredScanSuppressions.json @@ -82,9 +82,7 @@ }, { "file": [ - "src\\communication\\azext_communication\\tests\\latest\\recordings\\test_service_link_to_notification_hub.yaml", - "src\\communication\\azext_communication\\tests\\latest\\recordings\\test_service_regenerate_and_link_key.yaml", - "src\\communication\\azext_communication\\tests\\latest\\test_communication_scenario.py" + "src\\communication\\azext_communication\\tests\\latest\\recordings\\test_communication_scenario.yaml" ], "_justification": "Dummy resources' tokens left during testing Micorosfot.Communication" }, diff --git a/src/communication/HISTORY.rst b/src/communication/HISTORY.rst index 3ea0b309ff8..8a0507db6e3 100644 --- a/src/communication/HISTORY.rst +++ b/src/communication/HISTORY.rst @@ -3,6 +3,16 @@ Release History =============== +1.2.0 +++++++ +* Add communication chat command group in preview mode. +* Add communication identity command group in preview mode. +* Deprecate 'identity issue-access-token' for 'identity token issue' +* Deprecate 'sms sens-sms' for 'sms send' +* Deprecate 'phonenumbers show-phonenumber' for 'phonenumber show' +* Deprecate 'phonenumbers list-phonenumbers' for 'phonenumber list' + + 1.1.2 ++++++ * Add support for multiple SMS recipients. diff --git a/src/communication/README.md b/src/communication/README.md index ca5cb804b7f..e1d8257b597 100644 --- a/src/communication/README.md +++ b/src/communication/README.md @@ -9,6 +9,10 @@ az extension add --name communication Then set the `AZURE_COMMUNICATION_CONNECTION_STRING` environment variable with your ACS connection string. +For chat module, set both `AZURE_COMMUNICAITON_ENDPOINT` and `AZURE_COMMUNICATION_ACCESS_TOKEN` environment variables. +You can find your endpoint from your in Azure Portal under your communication resource, and an access token can be created with +```az communication identity token issue --scope chat```. + ### Included Features ### ##### Create ##### @@ -51,22 +55,94 @@ az communication regenerate-key --name "MyCommunicationResource" --key-type "Pri ``` az communication delete --name "MyCommunicationResource" --resource-group "MyResourceGroup" ``` +##### Create-User ##### +``` +az communication identity user create +``` +##### Delete-User ##### +``` +az communication identity user delete --user "8:acs:xxxxxx" +``` ##### Issue-Access-Token ##### ``` -az communication identity issue-access-token --scope chat +az communication identity token issue --scope chat -az communication identity issue-access-token --scope chat voip --userid "8:acs:xxxxxx" +az communication identity token issue --scope chat voip --user "8:acs:xxxxxx" +``` +##### Revoke-Access-Tokens ##### +``` +az communication identity token revoke --user "8:acs:xxxxxx" +``` +##### Get-Token-For-Teams-User ##### +``` +az communication identity token get-for-teams-user --aad-token "MyAzureADToken" --client "MyAzureADAppId" --aad-user "MyTeamsUserId" ``` ##### Send-SMS ##### ``` -az communication sms send-sms --sender "+1833xxxxxxx" \ +az communication sms send --sender "+1833xxxxxxx" \ --recipient "+1425xxxxxxx" "+1426xxxxxxx" "+1427xxxxxxx" --message "Hello there!!" ``` ##### List-Phonenumbers ##### ``` -az communication phonenumbers list-phonenumbers +az communication phonenumber list ``` ##### Show-Phonenumber ##### ``` -az communication phonenumbers show-phonenumber --phonenumber "+1833xxxxxxx" +az communication phonenumber show --phonenumber "+1833xxxxxxx" +``` +##### List-Threads ##### +``` +az communication chat thread list --start-time "2022-07-14T10:20:30" +``` +##### Create-Thread ##### +``` +az communication chat thread create --topic "New Topic for Chat!" --idempotency-token "abc187xxxxxx" +``` +##### Delete-Thread ##### +``` +az communication chat thread delete --thread "19:xxxxxx" +``` +##### Update Topic ##### +``` +az communication chat thread update-topic --thread "19:xxxxxx" --topic "New topic!" +``` +##### List-Participants ##### +``` +az communication chat participant list --thread "19:xxxxxx" --skip "5" +``` +##### Add-Participant ##### +``` +az communication chat participant add --thread "19:xxxxxx" --user "8:acs:xxxxxx" --display-name "John Doe" --start-time "2022-06-30T00:00:00" +``` +##### Remove-Participant ##### +``` +az communication chat participant remove --thread "19:xxxxxx" --user "8:acs:xxxxxx" +``` +##### Send-Message ##### +``` +az communication chat message send --thread "19:xxxxxx" --display-name "John Doe" --content "Hello there!" --message-type "text" +``` +##### List-Messages ##### +``` +az communication chat message list --thread "19:xxxxxx" --start-time "2022-07-14T10:20:30" +``` +##### Get-Message ##### +``` +az communication chat message get --thread "19:xxxxxx" --message-id "1xxxxxxxxxxxx" +``` +##### Update-Message ##### +``` +az communication chat message update --thread "19:xxxxxx" --message-id "1xxxxxxxxxxxx" --content "Hello there, again!" +``` +##### Delete-Message ##### +``` +az communication chat message delete --thread "19:xxxxxx" --message-id "1xxxxxxxxxxxx" +``` +##### List-Read-Receipts ##### +``` +az communication chat message receipt list --thread "19:xxxxxx" --skip "5" +``` +##### Send-Read-Receipt ##### +``` +az communication chat message receipt send --thread "19:xxxxxx" --message-id "1xxxxxxxxxxxx" ``` diff --git a/src/communication/azext_communication/__init__.py b/src/communication/azext_communication/__init__.py index cc078cff820..92b97658278 100644 --- a/src/communication/azext_communication/__init__.py +++ b/src/communication/azext_communication/__init__.py @@ -51,13 +51,15 @@ def load_arguments(self, command): class CommunicationCommandGroup(AzCommandGroup): - def communication_custom_command(self, name, method_name, **kwargs): + def communication_custom_command(self, name, method_name, arguments, **kwargs): command_name = self.custom_command(name, method_name, **kwargs) - self._register_data_plane_account_arguments(command_name) + self._register_data_plane_account_arguments(command_name, arguments) - def _register_data_plane_account_arguments(self, command_name): + def _register_data_plane_account_arguments(self, command_name, arguments): """ Add parameters required to create a communication client """ from .manual._validators import validate_client_parameters + from .manual._validators import validate_endpoint + from .manual._validators import validate_access_token command = self.command_loader.command_table.get(command_name, None) @@ -65,10 +67,23 @@ def _register_data_plane_account_arguments(self, command_name): return group_name = 'communication' - command.add_argument('connection_string', '--connection-string', required=False, default=None, - validator=validate_client_parameters, arg_group=group_name, - help='Communication connection string. Environment variable: ' - 'AZURE_COMMUNICATION_CONNECTION_STRING') + if 'connection_string' in arguments: + command.add_argument('connection_string', '--connection-string', required=False, default=None, + validator=validate_client_parameters, arg_group=group_name, + help='Communication connection string. Environment variable: ' + 'AZURE_COMMUNICATION_CONNECTION_STRING') + + if 'endpoint' in arguments: + command.add_argument('endpoint', '--endpoint', required=False, default=None, + validator=validate_endpoint, arg_group=group_name, + help='Communication endpoint. Environment variable: ' + 'AZURE_COMMUNICATION_ENDPOINT') + + if 'access_token' in arguments: + command.add_argument('access_token', '--access-token', required=False, default=None, + validator=validate_access_token, arg_group=group_name, + help='Communication access token. Environment variable: ' + 'AZURE_COMMUNICATION_ACCESS_TOKEN') COMMAND_LOADER_CLS = CommunicationServiceManagementClientCommandsLoader diff --git a/src/communication/azext_communication/manual/_client_factory.py b/src/communication/azext_communication/manual/_client_factory.py index ca095c3502f..8ec5d5806f7 100644 --- a/src/communication/azext_communication/manual/_client_factory.py +++ b/src/communication/azext_communication/manual/_client_factory.py @@ -5,22 +5,56 @@ # pylint: disable=unused-argument + +from azure.cli.core.azclierror import RequiredArgumentMissingError + + def cf_communication_identity(cli_ctx, kwargs): from azure.communication.identity import CommunicationIdentityClient + connection_string = kwargs.pop('connection_string', None) + if connection_string is None: + error_msg = 'Please specify --connection-string, or set AZURE_COMMUNICATION_CONNECTION_STRING.' + raise RequiredArgumentMissingError(error_msg) + client = CommunicationIdentityClient.from_connection_string(connection_string) return client def cf_communication_sms(cli_ctx, kwargs): from azure.communication.sms import SmsClient + connection_string = kwargs.pop('connection_string', None) + if connection_string is None: + error_msg = 'Please specify --connection-string, or set AZURE_COMMUNICATION_CONNECTION_STRING.' + raise RequiredArgumentMissingError(error_msg) + client = SmsClient.from_connection_string(connection_string) return client def cf_communication_phonenumbers(cli_ctx, kwargs): from azure.communication.phonenumbers import PhoneNumbersClient + connection_string = kwargs.pop('connection_string', None) + if connection_string is None: + error_msg = 'Please specify --connection-string, or set AZURE_COMMUNICATION_CONNECTION_STRING.' + raise RequiredArgumentMissingError(error_msg) + client = PhoneNumbersClient.from_connection_string(connection_string) return client + + +def cf_communication_chat(cli_ctx, kwargs): + from azure.communication.chat import ChatClient, CommunicationTokenCredential + + endpoint = kwargs.pop('endpoint', None) + if endpoint is None: + raise RequiredArgumentMissingError('Please specify --endpoint, or set AZURE_COMMUNICATION_ENDPOINT.') + + token = kwargs.pop('access_token', None) + if token is None: + raise RequiredArgumentMissingError('Please specify --access-token or set AZURE_COMMUNICATION_ACCESS_TOKEN.') + + client = ChatClient(endpoint, CommunicationTokenCredential(token)) + return client diff --git a/src/communication/azext_communication/manual/_help.py b/src/communication/azext_communication/manual/_help.py index 737a049a0f4..a75a17fa68a 100644 --- a/src/communication/azext_communication/manual/_help.py +++ b/src/communication/azext_communication/manual/_help.py @@ -114,7 +114,30 @@ helps['communication identity'] = """ type: group - short-summary: Commands to manage User Identity for a CommunicationService resource. + short-summary: Commands to manage user identities and their tokens for a CommunicationService resource. +""" + +helps['communication identity user'] = """ + type: group + short-summary: Commands to manage user Identities for a CommunicationService resource. +""" + +helps['communication identity user create'] = """ + type: command + short-summary: "Craetes a new ACS identity." + examples: + - name: create + text: |- + az communication identity user create +""" + +helps['communication identity user delete'] = """ + type: command + short-summary: "Deletes the ACS identity, revokes all tokens for the identity and deletes all associated data." + examples: + - name: delete + text: |- + az communication identity user delete --user "8:acs:xxxxxx" """ helps['communication identity issue-access-token'] = """ @@ -124,21 +147,66 @@ - name: issue-access-token text: |- az communication identity issue-access-token --scope chat - - name: issue-access-token with multiple scopes and userid + - name: issue access-token with multiple scopes and user text: |- az communication identity issue-access-token --scope chat voip --userid "8:acs:xxxxxx" """ +helps['communication identity token'] = """ + type: group + short-summary: Commands to manage user tokens for a CommunicationService resource. +""" + +helps['communication identity token issue'] = """ + type: command + short-summary: "Issues a new access token with the specified scopes for a given User Identity. If no User Identity is specified, creates a new User Identity as well." + examples: + - name: issue access-token + text: |- + az communication identity token issue --scope chat + - name: issue access-token with multiple scopes and user + text: |- + az communication identity token issue --scope chat voip --user "8:acs:xxxxxx" +""" + +helps['communication identity token revoke'] = """ + type: command + short-summary: "Revokes all access tokens for the specific identity." + examples: + - name: revoke access-tokens + text: |- + az communication identity token revoke --user "8:acs:xxxxxx" +""" + +helps['communication identity token get-for-teams-user'] = """ + type: command + short-summary: "Exchanges an Azure Active Directory (Azure AD) access token of a Teams user for a new Communication Identity access token with a matching expiration time." + examples: + - name: token get-for-teams-user + text: |- + az communication identity token get-for-teams-user --aad-token "aad-123-xyz" --client "app-id-123-xyz" --aad-user "uid" +""" + helps['communication sms'] = """ type: group short-summary: Commands to manage SMS for a CommunicationService resource. """ -helps['communication sms send-sms'] = """ +helps['communication sms send'] = """ type: command short-summary: "Sends an SMS from the sender phone number to the recipient(s) phone number." examples: - name: send sms + text: |- + az communication sms send --sender "+1833xxxxxxx" \ +--recipient "+1425xxxxxxx" "+1426xxxxxxx" "+1427xxxxxxx" --message "Hello there!!" +""" + +helps['communication sms send-sms'] = """ + type: command + short-summary: "Sends an SMS from the sender phone number to the recipient(s) phone number." + examples: + - name: send-sms text: |- az communication sms send-sms --sender "+1833xxxxxxx" \ --recipient "+1425xxxxxxx" "+1426xxxxxxx" "+1427xxxxxxx" --message "Hello there!!" @@ -153,7 +221,7 @@ type: command short-summary: "Lists all phone numbers associated with the CommunicationService resource." examples: - - name: list phonenumbers + - name: list-phonenumbers text: |- az communication phonenumbers list-phonenumbers """ @@ -162,7 +230,181 @@ type: command short-summary: "Shows the details for a phone number associated with the CommunicationService resource." examples: - - name: show phonenumber + - name: show-phonenumber text: |- az communication phonenumbers show-phonenumber --phonenumber "+1833xxxxxxx" """ + +helps['communication phonenumber'] = """ + type: group + short-summary: Commands to manage phone numbers for a CommunicationService resource. +""" + +helps['communication phonenumber list'] = """ + type: command + short-summary: "Lists all phone numbers associated with the CommunicationService resource." + examples: + - name: list phonenumbers + text: |- + az communication phonenumber list +""" + +helps['communication phonenumber show'] = """ + type: command + short-summary: "Shows the details for a phone number associated with the CommunicationService resource." + examples: + - name: show phonenumber + text: |- + az communication phonenumber show --phonenumber "+1833xxxxxxx" +""" + +helps['communication chat'] = """ + type: group + short-summary: Commands to interact with Azure Communication Services Chat gateway. +""" + +helps['communication chat thread'] = """ + type: group + short-summary: Commands to manage chat thread of a CommunicationService resource. +""" + +helps['communication chat thread list'] = """ + type: command + short-summary: "Gets the list of chat threads of a user." + examples: + - name: chat list threads + text: |- + az communication chat thread list +""" + +helps['communication chat thread create'] = """ + type: command + short-summary: "Creates a chat thread." + examples: + - name: chat create thread + text: |- + az communication chat thread create --topic "chat-topic" +""" + +helps['communication chat thread delete'] = """ + type: command + short-summary: "Deletes a chat thread." + examples: + - name: chat delete thread + text: |- + az communication chat thread delete --thread "19:a-bcd=xyz" +""" + +helps['communication chat thread update-topic'] = """ + type: command + short-summary: "Updates the topic of a chat thread." + examples: + - name: chat update-topic + text: |- + az communication chat thread update-topic --thread "19:a-bcd=xyz" --topic "New topic!" +""" + +helps['communication chat participant'] = """ + type: group + short-summary: Commands to manage participants in a chat thread of a CommunicationService resource. +""" + +helps['communication chat participant list'] = """ + type: command + short-summary: "Gets the participants of a chat thread." + examples: + - name: chat list participants + text: |- + az communication chat participant list --thread "19:a-bcd=xyz" --skip "4" +""" + +helps['communication chat participant add'] = """ + type: command + short-summary: "Adds a participant to a chat thread." + examples: + - name: chat add participant + text: |- + az communication chat participant add --thread "19:a-bcd=xyz" --user "8:acs:xxxxxx" --display-name "John Doe" --start-time "2022-07-14T10:21" +""" + +helps['communication chat participant remove'] = """ + type: command + short-summary: "Removes a participant from a chat thread." + examples: + - name: chat remove participant + text: |- + az communication chat participant remove --thread "19:a-bcd=xyz" --user "8:acs:xxxxxx" +""" + +helps['communication chat message'] = """ + type: group + short-summary: Commands to manage messages in a chat thread of a CommunicationService resource. +""" + +helps['communication chat message send'] = """ + type: command + short-summary: "Sends a message to a chat thread." + examples: + - name: chat send message + text: |- + az communication chat message send --thread "19:a-bcd=xyz" --display-name "John Doe" --content "Hello there!" --message-type "text" +""" + +helps['communication chat message list'] = """ + type: command + short-summary: "Gets list of messages from a chat thread." + examples: + - name: chat list messages + text: |- + az communication chat message list --thread "19:a-bcd=xyz" --start-time "2022-07-14T10:21" +""" + +helps['communication chat message get'] = """ + type: command + short-summary: "Gets a message from a chat thread by id." + examples: + - name: chat get message + text: |- + az communication chat message get --thread "19:a-bcd=xyz" --message-id "12345678" +""" + +helps['communication chat message update'] = """ + type: command + short-summary: "Updates a message." + examples: + - name: chat update message + text: |- + az communication chat message update --thread "19:a-bcd=xyz" --message-id "12345678" --content "Hello, there!" +""" + +helps['communication chat message delete'] = """ + type: command + short-summary: "Deletes a message from a chat thread by id." + examples: + - name: chat delete message + text: |- + az communication chat message delete --thread "19:a-bcd=xyz" --message-id "12345678" +""" + +helps['communication chat message receipt'] = """ + type: group + short-summary: Commands to manage message read-receipts in a chat thread of a CommunicationService resource. +""" + +helps['communication chat message receipt list'] = """ + type: command + short-summary: "Gets read receipts of a chat thread." + examples: + - name: chat list read-receipts + text: |- + az communication chat message receipt list --thread "19:a-bcd=xyz" --skip "4" +""" + +helps['communication chat message receipt send'] = """ + type: command + short-summary: "Posts a read receipt event to a chat thread, on behalf of a user." + examples: + - name: chat send read-receipt + text: |- + az communication chat message receipt send --thread "19:a-bcd=xyz" --message-id "12345678" +""" diff --git a/src/communication/azext_communication/manual/_params.py b/src/communication/azext_communication/manual/_params.py index eb085b6a3f1..4d4929c0e19 100644 --- a/src/communication/azext_communication/manual/_params.py +++ b/src/communication/azext_communication/manual/_params.py @@ -8,17 +8,162 @@ def load_arguments(self, _): with self.argument_context('communication update') as c: c.argument('location', validator=None) + _load_identity_arguments(self) + _load_sms_arguments(self) + _load_phonenumber_arguments(self) + _load_chat_arguments(self) + + +def _load_identity_arguments(self): + self.argument_context('communication identity user create') + + with self.argument_context('communication identity user delete') as c: + c.argument('user_id', options_list=['--user'], type=str, help='ACS identifier') + with self.argument_context('communication identity issue-access-token') as c: - c.argument('userid', options_list=['--userid', '-u'], type=str, help='ACS identifier') - c.argument('scopes', options_list=[ - '--scope', '-s'], nargs='+', help='list of scopes for an access token ex: chat/voip') + c.argument('user_id', options_list=['--userid', '-u'], type=str, help='ACS identifier') + c.argument('scopes', options_list=['--scope', '-s'], + nargs='+', help='list of scopes for an access token ex: chat/voip') + + with self.argument_context('communication identity token issue') as c: + c.argument('user_id', options_list=['--user'], type=str, help='ACS identifier') + c.argument('scopes', options_list=['--scope'], nargs='+', + help='list of scopes for an access token ex: chat/voip') + + with self.argument_context('communication identity token revoke') as c: + c.argument('user_id', options_list=['--user'], type=str, help='ACS identifier') + + with self.argument_context('communication identity token get-for-teams-user') as c: + c.argument('aad_token', options_list=['--aad-token'], type=str, help='Azure AD access token of a Teams User') + c.argument('client_id', options_list=['--client'], type=str, help='Client ID of an Azure AD application' + 'to be verified against the appId claim in the Azure AD access token') + c.argument('user_object_id', options_list=['--aad-user'], type=str, help='Object ID of an Azure AD user' + '(Teams User) to be verified against the OID claim in the Azure AD access token') + +def _load_sms_arguments(self): with self.argument_context('communication sms send-sms') as c: - c.argument('sender', options_list=['--sender', '-s'], type=str, help='The sender of the SMS') - c.argument('recipients', options_list=[ - '--recipient', '-r'], nargs='+', help='The recipient(s) of the SMS') - c.argument('message', options_list=['--message', '-m'], type=str, help='The message in the SMS') + c.argument('sender', options_list=['--sender', '-s'], + type=str, help='The sender of the SMS') + c.argument('recipients', options_list=['--recipient', '-r'], + nargs='+', help='The recipient(s) of the SMS') + c.argument('message', options_list=['--message', '-m'], + type=str, help='The message in the SMS') + with self.argument_context('communication sms send') as c: + c.argument('sender', options_list=['--sender'], + type=str, help='The sender of the SMS') + c.argument('recipients', options_list=['--recipient'], + nargs='+', help='The recipient(s) of the SMS') + c.argument('message', options_list=['--message'], + type=str, help='The message in the SMS') + +def _load_phonenumber_arguments(self): with self.argument_context('communication phonenumbers show-phonenumber') as c: - c.argument('phonenumber', options_list=[ - '--phonenumber', '-p'], type=str, help='Phone number to get information about') + c.argument('phonenumber', options_list=['--phonenumber', '-p'], + type=str, help='Phone number to get information about') + with self.argument_context('communication phonenumber show') as c: + c.argument('phonenumber', options_list=['--phonenumber'], + type=str, help='Phone number to get information about') + + +def _load_chat_arguments(self): + _load_chat_thread_management(self) + _load_chat_participant_management(self) + _load_chat_message_management(self) + + +def _load_chat_thread_management(self): + with self.argument_context('communication chat thread list') as c: + c.argument('start_time', options_list=['--start-time'], + type=str, help='Start time in ISO8601 format, ex: 2022-07-14T10:21') + + with self.argument_context('communication chat thread create') as c: + c.argument('topic', options_list=['--topic'], + type=str, help='Chat topic') + c.argument('idempotency_token', options_list=['--idempotency-token'], + type=str, help='Idempotency token') + + with self.argument_context('communication chat thread delete') as c: + c.argument('thread_id', options_list=['--thread', '-t'], + type=str, help='Thread id') + + with self.argument_context('communication chat thread update-topic') as c: + c.argument('thread_id', options_list=['--thread', '-t'], + type=str, help='Thread id') + c.argument('topic', options_list=['--topic'], + type=str, help='Chat topic') + + +def _load_chat_participant_management(self): + with self.argument_context('communication chat participant list') as c: + c.argument('thread_id', options_list=['--thread', '-t'], + type=str, help='Thread id') + c.argument('skip', options_list=['--skip'], + type=str, help='Number of participants to skip') + + with self.argument_context('communication chat participant add') as c: + c.argument('thread_id', options_list=['--thread', '-t'], + type=str, help='Thread id') + c.argument('user_id', options_list=['--user'], + type=str, help='Chat participant identifier') + c.argument('display_name', options_list=['--display-name'], + type=str, help='Chat participant display name') + c.argument('start_time', options_list=['--start-time'], + type=str, help='Start time to share history in ISO8601 format, ex: 2022-07-14T10:21') + + with self.argument_context('communication chat participant remove') as c: + c.argument('thread_id', options_list=['--thread', '-t'], + type=str, help='Thread id') + c.argument('user_id', options_list=['--user'], + type=str, help='Chat participant identifier') + + +def _load_chat_message_management(self): + with self.argument_context('communication chat message send') as c: + c.argument('thread_id', options_list=['--thread', '-t'], + type=str, help='Thread id') + c.argument('display_name', options_list=['--display-name'], + type=str, help='Sender''s display name') + c.argument('message_content', options_list=['--content'], + type=str, help='Chat message content') + c.argument('message_type', options_list=['--message-type'], + type=str, help='Content type, can be text or html') + + with self.argument_context('communication chat message list') as c: + c.argument('thread_id', options_list=['--thread', '-t'], + type=str, help='Thread id') + c.argument('start_time', options_list=['--start-time'], + type=str, help='Start time in ISO8601 format, ex: 2022-07-14T10:21') + + with self.argument_context('communication chat message get') as c: + c.argument('thread_id', options_list=['--thread', '-t'], + type=str, help='Thread id') + c.argument('message_id', options_list=['--message-id'], + type=str, help='Message id') + + with self.argument_context('communication chat message update') as c: + c.argument('thread_id', options_list=['--thread', '-t'], + type=str, help='Thread id') + c.argument('message_id', options_list=['--message-id'], + type=str, help='Message id') + c.argument('message_content', options_list=['--content'], + type=str, help='Chat message content') + + with self.argument_context('communication chat message delete') as c: + c.argument('thread_id', options_list=['--thread', '-t'], + type=str, help='Thread id') + c.argument('message_id', options_list=['--message-id'], + type=str, help='Message id') + + with self.argument_context('communication chat message receipt list') as c: + c.argument('thread_id', options_list=['--thread', '-t'], + type=str, help='Thread id') + c.argument('skip', options_list=['--skip'], + type=str, help='Number of read receipts to skip') + + with self.argument_context('communication chat message receipt send') as c: + c.argument('thread_id', options_list=['--thread', '-t'], + type=str, help='Thread id') + c.argument('message_id', options_list=['--message-id'], + type=str, help='Message id') diff --git a/src/communication/azext_communication/manual/_validators.py b/src/communication/azext_communication/manual/_validators.py index b277561b571..f6bbcda1078 100644 --- a/src/communication/azext_communication/manual/_validators.py +++ b/src/communication/azext_communication/manual/_validators.py @@ -15,3 +15,19 @@ def validate_client_parameters(cmd, namespace): if not n.connection_string: n.connection_string = get_config_value(cmd, 'communication', 'connection_string', None) + + +def validate_endpoint(cmd, namespace): + """ Retrieves communication connection parameters from environment variables """ + n = namespace + + if not n.endpoint: + n.endpoint = get_config_value(cmd, 'communication', 'endpoint', None) + + +def validate_access_token(cmd, namespace): + """ Retrieves communication connection parameters from environment variables """ + n = namespace + + if not n.access_token: + n.access_token = get_config_value(cmd, 'communication', 'access_token', None) diff --git a/src/communication/azext_communication/manual/commands.py b/src/communication/azext_communication/manual/commands.py index 063ddaadfb6..427f3cce8ae 100644 --- a/src/communication/azext_communication/manual/commands.py +++ b/src/communication/azext_communication/manual/commands.py @@ -7,16 +7,63 @@ from azext_communication.manual._client_factory import cf_communication_identity from azext_communication.manual._client_factory import cf_communication_sms from azext_communication.manual._client_factory import cf_communication_phonenumbers +from azext_communication.manual._client_factory import cf_communication_chat def load_command_table(self, _): + identity_arguments = ['connection_string'] + with self.command_group('communication identity user', client_factory=cf_communication_identity, is_preview=True) as g: + g.communication_custom_command('create', "communication_identity_create_user", identity_arguments, client_factory=cf_communication_identity) + g.communication_custom_command('delete', "communication_identity_delete_user", identity_arguments, client_factory=cf_communication_identity) + with self.command_group('communication identity', client_factory=cf_communication_identity) as g: - g.communication_custom_command('issue-access-token', "issue_access_token", client_factory=cf_communication_identity) + g.communication_custom_command('issue-access-token', "communication_identity_issue_access_token", identity_arguments, client_factory=cf_communication_identity, + deprecate_info=self.deprecate(redirect='token issue', hide=True)) + + with self.command_group('communication identity token', client_factory=cf_communication_identity, is_preview=True) as g: + g.communication_custom_command('issue', "communication_identity_issue_access_token", identity_arguments, client_factory=cf_communication_identity) + g.communication_custom_command('revoke', "communication_identity_revoke_access_tokens", identity_arguments, client_factory=cf_communication_identity) + g.communication_custom_command('get-for-teams-user', "communication_identity_get_token_for_teams_user", identity_arguments, client_factory=cf_communication_identity) + sms_arguments = ['connection_string'] + with self.command_group('communication sms', client_factory=cf_communication_sms, is_preview=True) as g: + g.communication_custom_command('send', 'communication_send_sms', sms_arguments) with self.command_group('communication sms', client_factory=cf_communication_sms) as g: - g.communication_custom_command('send-sms', 'communication_send_sms') + g.communication_custom_command('send-sms', 'communication_send_sms', sms_arguments, + deprecate_info=self.deprecate(redirect='send', hide=True)) + phonenumber_arguments = ['connection_string'] + with self.command_group('communication phonenumber', client_factory=cf_communication_phonenumbers, is_preview=True) as g: + g.communication_custom_command('list', 'communication_list_phonenumbers', phonenumber_arguments) + g.communication_custom_command('show', 'communication_show_phonenumber', phonenumber_arguments) with self.command_group('communication phonenumbers', client_factory=cf_communication_phonenumbers) as g: - g.communication_custom_command('list-phonenumbers', 'communication_list_phonenumbers') - g.communication_custom_command('show-phonenumber', 'communication_show_phonenumber') + g.communication_custom_command('list-phonenumbers', 'communication_list_phonenumbers', phonenumber_arguments, + deprecate_info=self.deprecate(redirect='list', hide=True)) + g.communication_custom_command('show-phonenumber', 'communication_show_phonenumber', phonenumber_arguments, + deprecate_info=self.deprecate(redirect='show', hide=True)) + + chat_arguments = ['endpoint', 'access_token'] + # thread management + with self.command_group('communication chat thread', client_factory=cf_communication_chat, is_preview=True) as g: + g.communication_custom_command('list', 'communication_chat_list_threads', chat_arguments) + g.communication_custom_command('create', 'communication_chat_create_thread', chat_arguments) + g.communication_custom_command('delete', 'communication_chat_delete_thread', chat_arguments) + g.communication_custom_command('update-topic', 'communication_chat_update_topic', chat_arguments) + + # participant management + with self.command_group('communication chat participant', client_factory=cf_communication_chat, is_preview=True) as g: + g.communication_custom_command('list', 'communication_chat_list_participants', chat_arguments) + g.communication_custom_command('add', 'communication_chat_add_participant', chat_arguments) + g.communication_custom_command('remove', 'communication_chat_remove_participant', chat_arguments) + + # message management + with self.command_group('communication chat message', client_factory=cf_communication_chat, is_preview=True) as g: + g.communication_custom_command('list', 'communication_chat_list_messages', chat_arguments) + g.communication_custom_command('send', 'communication_chat_send_message', chat_arguments) + g.communication_custom_command('get', 'communication_chat_get_message', chat_arguments) + g.communication_custom_command('update', 'communication_chat_update_message', chat_arguments) + g.communication_custom_command('delete', 'communication_chat_delete_message', chat_arguments) + with self.command_group('communication chat message receipt', client_factory=cf_communication_chat, is_preview=True) as g: + g.communication_custom_command('list', 'communication_chat_list_read_receipts', chat_arguments) + g.communication_custom_command('send', 'communication_chat_send_read_receipt', chat_arguments) diff --git a/src/communication/azext_communication/manual/custom.py b/src/communication/azext_communication/manual/custom.py index 1ea75facdb1..e5107abec6c 100644 --- a/src/communication/azext_communication/manual/custom.py +++ b/src/communication/azext_communication/manual/custom.py @@ -4,13 +4,21 @@ # -------------------------------------------------------------------------------------------- -from azure.communication.identity import CommunicationUserIdentifier +def communication_identity_create_user(client): + return client.create_user() -def issue_access_token(client, scopes, userid=None): - user_token_data = {"user_id": userid, "token": "", "expires_on": ""} - if userid is not None: - user = CommunicationUserIdentifier(userid) +def communication_identity_delete_user(client, user_id): + from azure.communication.identity import CommunicationUserIdentifier + + return client.delete_user(CommunicationUserIdentifier(user_id)) + + +def communication_identity_issue_access_token(client, scopes, user_id=None): + from azure.communication.identity import CommunicationUserIdentifier + user_token_data = {"user_id": user_id, "token": "", "expires_on": ""} + if user_id is not None: + user = CommunicationUserIdentifier(user_id) token_data = client.get_token(user, scopes) user_token_data["token"] = token_data.token user_token_data["expires_on"] = str(token_data.expires_on) @@ -24,6 +32,16 @@ def issue_access_token(client, scopes, userid=None): return user_token_data +def communication_identity_revoke_access_tokens(client, user_id): + from azure.communication.identity import CommunicationUserIdentifier + + return client.revoke_tokens(CommunicationUserIdentifier(user_id)) + + +def communication_identity_get_token_for_teams_user(client, aad_token, client_id, user_object_id): + return client.get_token_for_teams_user(aad_token, client_id, user_object_id) + + def communication_send_sms(client, sender, recipients, message): return client.send(from_=sender, to=recipients, message=message) @@ -34,3 +52,99 @@ def communication_list_phonenumbers(client): def communication_show_phonenumber(client, phonenumber): return client.get_purchased_phone_number(phonenumber) + + +def communication_chat_list_threads(client, start_time=None): + args = { + 'start_time': start_time, + } + return client.list_chat_threads(**args) + + +def communication_chat_create_thread(client, topic, idempotency_token=None): + args = { + 'idempotency_token': idempotency_token + } + return client.create_chat_thread(topic, **args) + + +def communication_chat_delete_thread(client, thread_id): + return client.delete_chat_thread(thread_id) + + +def communication_chat_list_participants(client, thread_id, skip=None): + args = { + 'skip': skip + } + chat_thread_client = client.get_chat_thread_client(thread_id) + return chat_thread_client.list_participants(**args) + + +def communication_chat_add_participant(client, thread_id, user_id, display_name=None, start_time=None): + from azure.communication.chat import ChatParticipant + from azure.communication.identity import CommunicationUserIdentifier + + chat_thread_client = client.get_chat_thread_client(thread_id) + participant = ChatParticipant( + identifier=CommunicationUserIdentifier(user_id), + display_name=display_name, + share_history_time=start_time + ) + res = chat_thread_client.add_participants([participant]) + return [r[1] for r in res] + + +def communication_chat_remove_participant(client, thread_id, user_id): + from azure.communication.identity import CommunicationUserIdentifier + chat_thread_client = client.get_chat_thread_client(thread_id) + return chat_thread_client.remove_participant(CommunicationUserIdentifier(user_id)) + + +def communication_chat_send_message(client, thread_id, message_content, message_type=None, display_name=None): + args = { + 'chat_message_type': message_type, + 'sender_display_name': display_name + } + chat_thread_client = client.get_chat_thread_client(thread_id) + return chat_thread_client.send_message(message_content, **args) + + +def communication_chat_list_messages(client, thread_id, start_time=None): + args = { + 'start_time': start_time + } + chat_thread_client = client.get_chat_thread_client(thread_id) + return chat_thread_client.list_messages(**args) + + +def communication_chat_get_message(client, thread_id, message_id): + chat_thread_client = client.get_chat_thread_client(thread_id) + return chat_thread_client.get_message(message_id) + + +def communication_chat_update_message(client, thread_id, message_id, message_content): + chat_thread_client = client.get_chat_thread_client(thread_id) + return chat_thread_client.update_message(message_id, message_content) + + +def communication_chat_delete_message(client, thread_id, message_id): + chat_thread_client = client.get_chat_thread_client(thread_id) + return chat_thread_client.update_message(message_id) + + +def communication_chat_update_topic(client, thread_id, topic): + chat_thread_client = client.get_chat_thread_client(thread_id) + return chat_thread_client.update_topic(topic) + + +def communication_chat_list_read_receipts(client, thread_id, skip=None): + args = { + 'skip': skip + } + chat_thread_client = client.get_chat_thread_client(thread_id) + return chat_thread_client.list_read_receipts(**args) + + +def communication_chat_send_read_receipt(client, thread_id, message_id): + chat_thread_client = client.get_chat_thread_client(thread_id) + return chat_thread_client.send_read_receipt(message_id) diff --git a/src/communication/azext_communication/tests/latest/example_steps.py b/src/communication/azext_communication/tests/latest/example_steps.py index 7e46a91d362..747d75742a5 100644 --- a/src/communication/azext_communication/tests/latest/example_steps.py +++ b/src/communication/azext_communication/tests/latest/example_steps.py @@ -55,7 +55,7 @@ def step_list2(test, rg_2, rg, checks=None): if checks is None: checks = [] test.cmd('az communication list ' - '-g ""', + '-g "{rg}"', checks=checks) diff --git a/src/communication/azext_communication/tests/latest/preparers.py b/src/communication/azext_communication/tests/latest/preparers.py index e41da6543ac..64cb361fff1 100644 --- a/src/communication/azext_communication/tests/latest/preparers.py +++ b/src/communication/azext_communication/tests/latest/preparers.py @@ -34,7 +34,6 @@ def create_resource(self, name, **kwargs): group = self._get_resource_group(**kwargs) if not self.dev_setting_name: - template = 'az communication create --name {} --location {} --data-location "{}" --resource-group {} ' self.live_only_execute(self.cli_ctx, template.format( name, self.location, self.data_location, group)) @@ -45,12 +44,20 @@ def create_resource(self, name, **kwargs): account_key = self.live_only_execute(self.cli_ctx, 'az communication list-key --name {} --resource-group {} --query "primaryConnectionString" -otsv' .format(name, group)).output.strip() + endpoint_str = account_key.split(';')[0] + endpoint = endpoint_str.split('=')[1] except AttributeError: # live only execute returns None if playing from record account_key = None + endpoint = None self.test_class_instance.kwargs[self.key] = name + + return {self.parameter_name: name, - self.parameter_name + '_info': (name, account_key or 'endpoint=https://sanitized.communication.azure.com/;accesskey=fake===')} + self.parameter_name + '_info': + (name, + account_key or 'endpoint=https://sanitized.communication.azure.com/;accesskey=fake===', + endpoint or 'https://sanitized.communication.azure.com/', )} def remove_resource(self, name, **kwargs): if not self.skip_delete and not self.dev_setting_name: diff --git a/src/communication/azext_communication/tests/latest/recording_processors.py b/src/communication/azext_communication/tests/latest/recording_processors.py index 7286235e088..41b097c13fa 100644 --- a/src/communication/azext_communication/tests/latest/recording_processors.py +++ b/src/communication/azext_communication/tests/latest/recording_processors.py @@ -22,15 +22,19 @@ class URIIdentityReplacer(RecordingProcessor): def process_request(self, request): resource = (urlparse(request.uri).netloc).split('.')[0] - request.uri = re.sub('phoneNumbers/[%2B\d]+', 'phoneNumbers/sanitized', request.uri) - request.uri = re.sub('/identities/([^/?]+)', '/identities/sanitized', request.uri) + request.uri = re.sub('/phoneNumbers/[%2B\d]+', '/phoneNumbers/sanitized', request.uri) + request.uri = re.sub('/identities/([^/?]+)', '/identities/sanitized', request.uri) + request.uri = re.sub('/chat/threads/([^/?]+)', '/chat/threads/sanitized', request.uri) + request.uri = re.sub('/chat/threads/([^/?]+)/messages/([^/?]+)', '/chat/threads/sanitized/messages/sanitized', request.uri) request.uri = re.sub(resource, 'sanitized', request.uri) return request def process_response(self, response): if 'url' in response: - response['url'] = re.sub('phoneNumbers/[%2B\d]+', 'phoneNumbers/sanitized', response['url']) + response['url'] = re.sub('/phoneNumbers/[%2B\d]+', '/phoneNumbers/sanitized', response['url']) response['url'] = re.sub('/identities/([^/?]+)', '/identities/sanitized', response['url']) + response['url'] = re.sub('/chat/threads/([^/?]+)', '/chat/threads/sanitized', response['url']) + response['url'] = re.sub('/chat/threads/([^/?]+)/messages/([^/?]+)', '/chat/threads/sanitized/messages/sanitized', response['url']) return response @@ -146,4 +150,4 @@ def _replace_recursively(dictionary): except (KeyError, ValueError): return body - return json.dumps(body) \ No newline at end of file + return json.dumps(body) diff --git a/src/communication/azext_communication/tests/latest/recordings/test_chat_add_participant.yaml b/src/communication/azext_communication/tests/latest/recordings/test_chat_add_participant.yaml new file mode 100644 index 00000000000..d6a2f1326dc --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_chat_add_participant.yaml @@ -0,0 +1,201 @@ +interactions: +- request: + body: '{"createTokenWithScopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - kWpGozyV35fifbpKdY8mbdG64VG0Pdq5upzo7YKAFM0= + x-ms-date: + - Tue, 16 Aug 2022 09:50:00 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", + "expiresOn": "2022-08-17T09:50:02.4106148+00:00"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + connection: + - keep-alive + content-length: + - '122' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:50:02 GMT + ms-cv: + - LsIStMJYHEarY2XXM8Rscw.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T095002Z-ue5bcnvs3t2n5ee38b8kwchyq400000000dg00000000hm2r + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 118ms + status: + code: 201 + message: Created +- request: + body: '{"createTokenWithScopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - kWpGozyV35fifbpKdY8mbdG64VG0Pdq5upzo7YKAFM0= + x-ms-date: + - Tue, 16 Aug 2022 09:50:01 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", + "expiresOn": "2022-08-17T09:50:02.9481547+00:00"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + connection: + - keep-alive + content-length: + - '122' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:50:03 GMT + ms-cv: + - ZDXwchTQ0kuzz5DHfSUcvA.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T095002Z-p18hf8s3dx4xf8cgexx53pe93400000000dg000000006ehu + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 126ms + status: + code: 201 + message: Created +- request: + body: '{"topic": "chat-topic", "participants": []}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '43' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + repeatability-request-id: + - ce6eaa92-b047-49b7-a5e9-0a708cf21f5f + method: POST + uri: https://sanitized.communication.azure.com/chat/threads?api-version=2021-09-07 + response: + body: + string: '{"chatThread": {"id": "sanitized", "topic": "chat-topic", "createdOn": + "2022-08-16T09:50:03Z", "createdByCommunicationIdentifier": {"rawId": "sanitized", + "communicationUser": {"id": "sanitized"}}}}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:50:03 GMT + location: + - https://clitest000002.communication.azure.com/chat/threads/19%3Asu9i_s8IXogihisX1C3q1cvIcYcJj-4d4MLhzNbVGus1@thread.v2 + ms-cv: + - k0FPjPB5rEqLYBZ40jT4hQ.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 0S2j7YgAAAACOfhbXaANLToG2Dzi575PeWVZSMzExMDAwMTE1MDM3ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 736ms + status: + code: 201 + message: Created +- request: + body: '{"participants": [{"communicationIdentifier": {"communicationUser": {"id": + "8:acs:21fe0420-a046-426d-b99b-c089229ea1be_00000013-45f1-08bf-eef0-8b3a0d0003fe"}}}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '161' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://sanitized.communication.azure.com/chat/threads/sanitized/participants/:add?api-version=2021-09-07 + response: + body: + string: '{}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:50:04 GMT + ms-cv: + - rJBLJ9il20+PZ/mOkRPtbg.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 0TGj7YgAAAABrI6O5f3jZSbgEDTx0OAuRWVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE= + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 259ms + status: + code: 201 + message: Created +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_chat_add_participant_bad_user.yaml b/src/communication/azext_communication/tests/latest/recordings/test_chat_add_participant_bad_user.yaml new file mode 100644 index 00000000000..0e934fa81c8 --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_chat_add_participant_bad_user.yaml @@ -0,0 +1,194 @@ +interactions: +- request: + body: '{"createTokenWithScopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - kWpGozyV35fifbpKdY8mbdG64VG0Pdq5upzo7YKAFM0= + x-ms-date: + - Tue, 16 Aug 2022 09:49:59 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", + "expiresOn": "2022-08-17T09:50:01.7960868+00:00"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + connection: + - keep-alive + content-length: + - '122' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:50:01 GMT + ms-cv: + - NFWG7AE5QU6Ft4Dpgrp08A.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T095001Z-ue5bcnvs3t2n5ee38b8kwchyq400000000dg000000009xg7 + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 120ms + status: + code: 201 + message: Created +- request: + body: '{"topic": "chat-topic", "participants": []}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '43' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + repeatability-request-id: + - 3e8e8614-9b47-4033-8c52-8585877e2504 + method: POST + uri: https://sanitized.communication.azure.com/chat/threads?api-version=2021-09-07 + response: + body: + string: '{"chatThread": {"id": "sanitized", "topic": "chat-topic", "createdOn": + "2022-08-16T09:50:02Z", "createdByCommunicationIdentifier": {"rawId": "sanitized", + "communicationUser": {"id": "sanitized"}}}}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:50:02 GMT + location: + - https://clitest000002.communication.azure.com/chat/threads/19%3AljMjuiP-Rqo10MByM7aOuQQ5nu2K3KuQuSfZegxgfkQ1@thread.v2 + ms-cv: + - 6YlBDJLdpUCYvjwlPGctLg.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T095002Z-p18hf8s3dx4xf8cgexx53pe93400000000dg000000004v6e + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 649ms + status: + code: 201 + message: Created +- request: + body: '{"participants": [{"communicationIdentifier": {"communicationUser": {"id": + "8:acs:00000000-1111-2222-3333-444444444444_55555555-6666-7777-8888-999999999999"}}}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '161' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://sanitized.communication.azure.com/chat/threads/sanitized/participants/:add?api-version=2021-09-07 + response: + body: + string: '{"invalidParticipants": [{"code": "403", "message": "Permissions check + failed", "target": "8:acs:00000000-1111-2222-3333-444444444444_55555555-6666-7777-8888-999999999999"}]}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:50:02 GMT + ms-cv: + - bE+G+thWwEewZJ/G2XBK+w.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 0S2j7YgAAAAA860Xr7NzwSaWgnSaX78ZCWVZSMzExMDAwMTE1MDM3ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 187ms + status: + code: 201 + message: Created +- request: + body: '{"participants": [{"communicationIdentifier": {"communicationUser": {"id": + "8:acs:fakeid==="}}}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '97' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://sanitized.communication.azure.com/chat/threads/sanitized/participants/:add?api-version=2021-09-07 + response: + body: + string: '{"CommunicationError": {"Code": "BadRequest", "Message": "Identifier + format is invalid (8:acs:fakeid===).", "Details": []}}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + content-type: + - application/json + date: + - Tue, 16 Aug 2022 09:50:04 GMT + ms-cv: + - zCWTru5f1EukHH1ZGiCyOg.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 0TGj7YgAAAADeYbo/B6rxRK2DKtYIx0ktWVZSMzExMDAwMTE2MDMxADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 22ms + status: + code: 400 + message: Bad Request +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_chat_add_participant_with_display_name.yaml b/src/communication/azext_communication/tests/latest/recordings/test_chat_add_participant_with_display_name.yaml new file mode 100644 index 00000000000..4187d4ce250 --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_chat_add_participant_with_display_name.yaml @@ -0,0 +1,202 @@ +interactions: +- request: + body: '{"createTokenWithScopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - kWpGozyV35fifbpKdY8mbdG64VG0Pdq5upzo7YKAFM0= + x-ms-date: + - Tue, 16 Aug 2022 09:50:00 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", + "expiresOn": "2022-08-17T09:50:02.5804306+00:00"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + connection: + - keep-alive + content-length: + - '122' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:50:02 GMT + ms-cv: + - 5IR1txpU9UmZdcRxtA7tvw.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T095002Z-z5w8hfkph50p97tr7b7ay90rp000000000bg00000001wf7s + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 134ms + status: + code: 201 + message: Created +- request: + body: '{"topic": "chat-topic", "participants": []}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '43' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + repeatability-request-id: + - 142afa66-5a01-4e85-b194-5fc6c2f8ca67 + method: POST + uri: https://sanitized.communication.azure.com/chat/threads?api-version=2021-09-07 + response: + body: + string: '{"chatThread": {"id": "sanitized", "topic": "chat-topic", "createdOn": + "2022-08-16T09:50:03Z", "createdByCommunicationIdentifier": {"rawId": "sanitized", + "communicationUser": {"id": "sanitized"}}}}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:50:03 GMT + location: + - https://clitest000002.communication.azure.com/chat/threads/19%3AceEGtwObpyj_D4rcZ5Z_gOgOaeaSshwWpfh9sMVRaVY1@thread.v2 + ms-cv: + - Gyx1qcpWLkuM2H8FWWLjeA.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T095003Z-6b2s4uq0rt4yf0aehsw4te2apc00000000dg00000000sb90 + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 609ms + status: + code: 201 + message: Created +- request: + body: '{"createTokenWithScopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - kWpGozyV35fifbpKdY8mbdG64VG0Pdq5upzo7YKAFM0= + x-ms-date: + - Tue, 16 Aug 2022 09:50:02 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", + "expiresOn": "2022-08-17T09:50:04.4487002+00:00"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + content-length: + - '122' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:50:03 GMT + ms-cv: + - /G4MEVIsYUuUHQrV3s2Txg.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 0TGj7YgAAAABQDsFfJbtARpkqcf2bK1cOWVZSMzExMDAwMTE1MDExADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 118ms + status: + code: 201 + message: Created +- request: + body: '{"participants": [{"communicationIdentifier": {"communicationUser": {"id": + "8:acs:1e9c1c2c-188b-4297-8fa4-3dbfba303095_00000013-45f1-0e9b-69f0-553a0d00f6a2"}}, + "displayName": "John Doe"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '188' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://sanitized.communication.azure.com/chat/threads/sanitized/participants/:add?api-version=2021-09-07 + response: + body: + string: '{}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:50:04 GMT + ms-cv: + - TUF1kTZUlEeqSFolR6Ao0g.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 0TGj7YgAAAAA1pHDWmDVISLfLLyXwFNBwWVZSMzExMDAwMTE1MDExADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 258ms + status: + code: 201 + message: Created +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_chat_add_participant_with_history_time.yaml b/src/communication/azext_communication/tests/latest/recordings/test_chat_add_participant_with_history_time.yaml new file mode 100644 index 00000000000..73b1e88fe18 --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_chat_add_participant_with_history_time.yaml @@ -0,0 +1,202 @@ +interactions: +- request: + body: '{"createTokenWithScopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - kWpGozyV35fifbpKdY8mbdG64VG0Pdq5upzo7YKAFM0= + x-ms-date: + - Tue, 16 Aug 2022 09:49:59 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", + "expiresOn": "2022-08-17T09:50:02.0216826+00:00"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + connection: + - keep-alive + content-length: + - '122' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:50:02 GMT + ms-cv: + - uDksiHFSo06vgaJc6RFNOw.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T095001Z-ue5bcnvs3t2n5ee38b8kwchyq400000000dg00000000hkyu + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 129ms + status: + code: 201 + message: Created +- request: + body: '{"topic": "chat-topic", "participants": []}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '43' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + repeatability-request-id: + - b8ef0319-b6b9-468f-98ba-a8cb667c6459 + method: POST + uri: https://sanitized.communication.azure.com/chat/threads?api-version=2021-09-07 + response: + body: + string: '{"chatThread": {"id": "sanitized", "topic": "chat-topic", "createdOn": + "2022-08-16T09:50:02Z", "createdByCommunicationIdentifier": {"rawId": "sanitized", + "communicationUser": {"id": "sanitized"}}}}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:50:03 GMT + location: + - https://clitest000002.communication.azure.com/chat/threads/19%3ArQd0sELNY_Lr9AoSEqBxSueAuyTbM95PBpVX2fmk6eU1@thread.v2 + ms-cv: + - FvHA0voBmEieCzWltEc7qg.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T095002Z-6b2s4uq0rt4yf0aehsw4te2apc00000000dg000000000udf + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 581ms + status: + code: 201 + message: Created +- request: + body: '{"createTokenWithScopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - kWpGozyV35fifbpKdY8mbdG64VG0Pdq5upzo7YKAFM0= + x-ms-date: + - Tue, 16 Aug 2022 09:50:01 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", + "expiresOn": "2022-08-17T09:50:03.7473547+00:00"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + content-length: + - '122' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:50:03 GMT + ms-cv: + - J4+9N0ogDE2N0a+9GRmDzQ.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 0S2j7YgAAAAAXgHv4f+H0SrhvE8Y1gm7jWVZSMzExMDAwMTE1MDQ5ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 125ms + status: + code: 201 + message: Created +- request: + body: '{"participants": [{"communicationIdentifier": {"communicationUser": {"id": + "8:acs:092a556e-45a7-442e-b9c8-13d8ebc7eb22_00000013-45f1-0bde-80f5-8b3a0d00050d"}}, + "shareHistoryTime": "2022-01-01T00:00:00.000Z"}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '209' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://sanitized.communication.azure.com/chat/threads/sanitized/participants/:add?api-version=2021-09-07 + response: + body: + string: '{}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:50:04 GMT + ms-cv: + - KAGysEdKtEKrYhbmxptBNA.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 0TGj7YgAAAAAnkCLJzxCIQLfhLbdl+BYsWVZSMzBFREdFMDMwOAA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE= + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 287ms + status: + code: 201 + message: Created +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_chat_create_thread.yaml b/src/communication/azext_communication/tests/latest/recordings/test_chat_create_thread.yaml new file mode 100644 index 00000000000..014052760c8 --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_chat_create_thread.yaml @@ -0,0 +1,106 @@ +interactions: +- request: + body: '{"createTokenWithScopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - kWpGozyV35fifbpKdY8mbdG64VG0Pdq5upzo7YKAFM0= + x-ms-date: + - Tue, 16 Aug 2022 09:51:39 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", + "expiresOn": "2022-08-17T09:51:41.0335374+00:00"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + connection: + - keep-alive + content-length: + - '122' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:51:41 GMT + ms-cv: + - GCrO3CYuT0WYNHADLG/buQ.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T095140Z-z5w8hfkph50p97tr7b7ay90rp000000000ag00000003uk24 + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 121ms + status: + code: 201 + message: Created +- request: + body: '{"topic": "some-topic", "participants": []}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '43' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + repeatability-request-id: + - de6dc945-909e-4c0a-a409-aef435da11a9 + method: POST + uri: https://sanitized.communication.azure.com/chat/threads?api-version=2021-09-07 + response: + body: + string: '{"chatThread": {"id": "sanitized", "topic": "some-topic", "createdOn": + "2022-08-16T09:51:41Z", "createdByCommunicationIdentifier": {"rawId": "sanitized", + "communicationUser": {"id": "sanitized"}}}}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:51:41 GMT + location: + - https://clitest000002.communication.azure.com/chat/threads/19%3ACWpfIAXQ-_3pSieepXdJrozZgrUxFk3P0JiICWMvgrU1@thread.v2 + ms-cv: + - R95zBVMqwUW2ngy7OQlwvg.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T095141Z-6b2s4uq0rt4yf0aehsw4te2apc00000000dg00000000dw4y + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 540ms + status: + code: 201 + message: Created +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_chat_create_thread_without_topic.yaml b/src/communication/azext_communication/tests/latest/recordings/test_chat_create_thread_without_topic.yaml new file mode 100644 index 00000000000..16499396840 --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_chat_create_thread_without_topic.yaml @@ -0,0 +1,56 @@ +interactions: +- request: + body: '{"createTokenWithScopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - kWpGozyV35fifbpKdY8mbdG64VG0Pdq5upzo7YKAFM0= + x-ms-date: + - Tue, 16 Aug 2022 09:51:38 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", + "expiresOn": "2022-08-17T09:51:40.6713674+00:00"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + connection: + - keep-alive + content-length: + - '122' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:51:40 GMT + ms-cv: + - 5Ny5J6E0YkOTeeEEAFv7mA.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T095140Z-zvdmwacghh4c97ggppewnyshxn00000000e000000003h910 + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 122ms + status: + code: 201 + message: Created +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_chat_delete_message.yaml b/src/communication/azext_communication/tests/latest/recordings/test_chat_delete_message.yaml new file mode 100644 index 00000000000..e9cb3fdbd2e --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_chat_delete_message.yaml @@ -0,0 +1,192 @@ +interactions: +- request: + body: '{"createTokenWithScopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - kWpGozyV35fifbpKdY8mbdG64VG0Pdq5upzo7YKAFM0= + x-ms-date: + - Tue, 16 Aug 2022 09:51:39 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", + "expiresOn": "2022-08-17T09:51:41.3614457+00:00"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + connection: + - keep-alive + content-length: + - '122' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:51:41 GMT + ms-cv: + - NyjFi9QZEEODJ2ySiuwRrw.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T095141Z-6b2s4uq0rt4yf0aehsw4te2apc00000000dg00000000t5e5 + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 123ms + status: + code: 201 + message: Created +- request: + body: '{"topic": "some-other-topic", "participants": []}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '49' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + repeatability-request-id: + - 77d3a950-2cd9-4955-8df6-a43e26bec851 + method: POST + uri: https://sanitized.communication.azure.com/chat/threads?api-version=2021-09-07 + response: + body: + string: '{"chatThread": {"id": "sanitized", "topic": "some-other-topic", "createdOn": + "2022-08-16T09:51:41Z", "createdByCommunicationIdentifier": {"rawId": "sanitized", + "communicationUser": {"id": "sanitized"}}}}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:51:42 GMT + location: + - https://clitest000002.communication.azure.com/chat/threads/19%3AtQbRRrrppDZM7G-muao2C7Q45dspLlYV6gjzyad9yFc1@thread.v2 + ms-cv: + - UEP/MKqBJU6M2hGOXdksCg.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T095141Z-z5w8hfkph50p97tr7b7ay90rp000000000ag00000003uk83 + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 421ms + status: + code: 201 + message: Created +- request: + body: '{"content": "Hello!", "type": "text"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '37' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://sanitized.communication.azure.com/chat/threads/sanitized/messages?api-version=2021-09-07 + response: + body: + string: '{"id": "sanitized"}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:51:42 GMT + location: + - https://clitest000002.communication.azure.com/chat/threads/19%3AtQbRRrrppDZM7G-muao2C7Q45dspLlYV6gjzyad9yFc1@thread.v2/messages/1660643502528 + ms-cv: + - BuASyKpEyE2ZOwhcOYLjLg.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T095142Z-ue5bcnvs3t2n5ee38b8kwchyq400000000dg00000000ketz + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 204ms + status: + code: 201 + message: Created +- request: + body: '{}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + Content-Type: + - application/merge-patch+json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + method: PATCH + uri: https://sanitized.communication.azure.com/chat/threads/sanitized/messages/sanitized?api-version=2021-09-07 + response: + body: + string: '' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + connection: + - keep-alive + date: + - Tue, 16 Aug 2022 09:51:43 GMT + ms-cv: + - a1Xy1biKq06zzTBB3x0H6g.0 + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T095142Z-ue5bcnvs3t2n5ee38b8kwchyq400000000dg0000000045wt + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 289ms + status: + code: 204 + message: No Content +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_chat_delete_thread.yaml b/src/communication/azext_communication/tests/latest/recordings/test_chat_delete_thread.yaml new file mode 100644 index 00000000000..1eb6b2724d8 --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_chat_delete_thread.yaml @@ -0,0 +1,144 @@ +interactions: +- request: + body: '{"createTokenWithScopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - kWpGozyV35fifbpKdY8mbdG64VG0Pdq5upzo7YKAFM0= + x-ms-date: + - Tue, 16 Aug 2022 09:51:38 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", + "expiresOn": "2022-08-17T09:51:40.8504947+00:00"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + connection: + - keep-alive + content-length: + - '122' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:51:40 GMT + ms-cv: + - 16j9c0qbeUeLe6oR5sh+Og.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T095140Z-r0s9pbvvdt0w72q6sqrkc1ktpw00000005g0000000011ptr + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 117ms + status: + code: 201 + message: Created +- request: + body: '{"topic": "some-topic", "participants": []}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '43' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + repeatability-request-id: + - 9e94686e-d149-4e85-8b58-829b51c14763 + method: POST + uri: https://sanitized.communication.azure.com/chat/threads?api-version=2021-09-07 + response: + body: + string: '{"chatThread": {"id": "sanitized", "topic": "some-topic", "createdOn": + "2022-08-16T09:51:41Z", "createdByCommunicationIdentifier": {"rawId": "sanitized", + "communicationUser": {"id": "sanitized"}}}}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:51:42 GMT + location: + - https://clitest000002.communication.azure.com/chat/threads/19%3AegRS6dK60O9yYgN3WDWOe4LXHLInS3YRU96XF2qy3ME1@thread.v2 + ms-cv: + - mpFI5LJDOUC3q74/ITAdIw.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T095141Z-zvdmwacghh4c97ggppewnyshxn00000000fg00000001qn7y + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 715ms + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + method: DELETE + uri: https://sanitized.communication.azure.com/chat/threads/sanitized?api-version=2021-09-07 + response: + body: + string: '' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + connection: + - keep-alive + date: + - Tue, 16 Aug 2022 09:51:42 GMT + ms-cv: + - UANS+3WfV0662gMTvJTrxA.0 + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T095142Z-p18hf8s3dx4xf8cgexx53pe93400000000dg0000000031dn + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 212ms + status: + code: 204 + message: No Content +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_chat_get_message.yaml b/src/communication/azext_communication/tests/latest/recordings/test_chat_get_message.yaml new file mode 100644 index 00000000000..b00ccf0e484 --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_chat_get_message.yaml @@ -0,0 +1,195 @@ +interactions: +- request: + body: '{"createTokenWithScopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - kWpGozyV35fifbpKdY8mbdG64VG0Pdq5upzo7YKAFM0= + x-ms-date: + - Tue, 16 Aug 2022 09:53:15 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", + "expiresOn": "2022-08-17T09:53:17.5785701+00:00"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + connection: + - keep-alive + content-length: + - '122' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:53:17 GMT + ms-cv: + - wKCTnRoTJE+eqrCIlZ5dOA.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T095317Z-pvk0k4gqx51st0bh1fssf7cw3000000005f000000001tq86 + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 129ms + status: + code: 201 + message: Created +- request: + body: '{"topic": "new-topic", "participants": []}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '42' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + repeatability-request-id: + - 0586b957-8d23-4a17-af78-5bc56fbfe392 + method: POST + uri: https://sanitized.communication.azure.com/chat/threads?api-version=2021-09-07 + response: + body: + string: '{"chatThread": {"id": "sanitized", "topic": "new-topic", "createdOn": + "2022-08-16T09:53:18Z", "createdByCommunicationIdentifier": {"rawId": "sanitized", + "communicationUser": {"id": "sanitized"}}}}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:53:18 GMT + location: + - https://clitest000002.communication.azure.com/chat/threads/19%3AYpSWK-2APrqgddvgvjNAcjW6aOSLZ7maoNMiiaMvCC81@thread.v2 + ms-cv: + - cXon1FDq/EKUIW8xd0Ku4g.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T095317Z-p18hf8s3dx4xf8cgexx53pe93400000000dg000000008af7 + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 954ms + status: + code: 201 + message: Created +- request: + body: '{"content": "hello!", "type": "html"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '37' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://sanitized.communication.azure.com/chat/threads/sanitized/messages?api-version=2021-09-07 + response: + body: + string: '{"id": "sanitized"}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:53:19 GMT + location: + - https://clitest000002.communication.azure.com/chat/threads/19%3AYpSWK-2APrqgddvgvjNAcjW6aOSLZ7maoNMiiaMvCC81@thread.v2/messages/1660643599231 + ms-cv: + - wHIksblXoUyCuKzGZ+aDtA.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T095319Z-vucxhh51rx5mv27fvss3h7q1kc00000000f0000000000916 + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 74ms + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://sanitized.communication.azure.com/chat/threads/sanitized/messages/sanitized?api-version=2021-09-07 + response: + body: + string: '{"id": "sanitized", "type": "html", "sequenceId": "3", "version": "1660643599231", + "content": {"message": "hello!"}, "senderDisplayName": "", "createdOn": "2022-08-16T09:53:19Z", + "senderCommunicationIdentifier": {"rawId": "sanitized", "communicationUser": + {"id": "sanitized"}}}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:53:19 GMT + ms-cv: + - 59pWRFZDikavygUlK4QKEw.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T095319Z-hq6y7egy7x60fea7pte6x8g1v000000000eg00000000wtra + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 136ms + status: + code: 200 + message: OK +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_chat_list_messages.yaml b/src/communication/azext_communication/tests/latest/recordings/test_chat_list_messages.yaml new file mode 100644 index 00000000000..b304590c2d2 --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_chat_list_messages.yaml @@ -0,0 +1,157 @@ +interactions: +- request: + body: '{"createTokenWithScopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - kWpGozyV35fifbpKdY8mbdG64VG0Pdq5upzo7YKAFM0= + x-ms-date: + - Tue, 16 Aug 2022 09:53:15 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", + "expiresOn": "2022-08-17T09:53:17.3507748+00:00"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + connection: + - keep-alive + content-length: + - '122' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:53:17 GMT + ms-cv: + - 5O/PwE13GE2Liz49rTkoPw.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T095316Z-pvk0k4gqx51st0bh1fssf7cw3000000005f000000001tq53 + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 123ms + status: + code: 201 + message: Created +- request: + body: '{"topic": "another-topic", "participants": []}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '46' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + repeatability-request-id: + - 56b24df4-5527-45fb-9e43-bba3e0176378 + method: POST + uri: https://sanitized.communication.azure.com/chat/threads?api-version=2021-09-07 + response: + body: + string: '{"chatThread": {"id": "sanitized", "topic": "another-topic", "createdOn": + "2022-08-16T09:53:18Z", "createdByCommunicationIdentifier": {"rawId": "sanitized", + "communicationUser": {"id": "sanitized"}}}}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:53:18 GMT + location: + - https://clitest000002.communication.azure.com/chat/threads/19%3AeR_MnK1spkPX4RHB4F0fyxIQVXDP0tn97zwRZbsRnPA1@thread.v2 + ms-cv: + - YtEJbR5NtEasHuNRDCB5Hg.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T095317Z-0613xdc17h3t90gs2g8fdg5r64000000009g00000002kyy1 + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 627ms + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://sanitized.communication.azure.com/chat/threads/sanitized/messages?startTime=2022-01-01T00%3A00%3A00.000Z&api-version=2021-09-07 + response: + body: + string: '{"value": [{"id": "1660643598419", "type": "topicUpdated", "sequenceId": + "2", "version": "1660643598419", "content": {"topic": "another-topic", "initiatorCommunicationIdentifier": + {"rawId": "8:acs:9e61d9f2-a2b3-4ab6-96e7-9985b8bf8dd9_00000013-45f4-0021-eef0-8b3a0d00046a", + "communicationUser": {"id": "8:acs:9e61d9f2-a2b3-4ab6-96e7-9985b8bf8dd9_00000013-45f4-0021-eef0-8b3a0d00046a"}}}, + "createdOn": "2022-08-16T09:53:18Z"}, {"id": "1660643598335", "type": "participantAdded", + "sequenceId": "1", "version": "1660643598335", "content": {"participants": + [{"communicationIdentifier": {"rawId": "8:acs:9e61d9f2-a2b3-4ab6-96e7-9985b8bf8dd9_00000013-45f4-0021-eef0-8b3a0d00046a", + "communicationUser": {"id": "8:acs:9e61d9f2-a2b3-4ab6-96e7-9985b8bf8dd9_00000013-45f4-0021-eef0-8b3a0d00046a"}}, + "shareHistoryTime": "1970-01-01T00:00:00Z"}], "initiatorCommunicationIdentifier": + {"rawId": "8:acs:9e61d9f2-a2b3-4ab6-96e7-9985b8bf8dd9_00000013-45f4-0021-eef0-8b3a0d00046a", + "communicationUser": {"id": "8:acs:9e61d9f2-a2b3-4ab6-96e7-9985b8bf8dd9_00000013-45f4-0021-eef0-8b3a0d00046a"}}}, + "createdOn": "2022-08-16T09:53:18Z"}]}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:53:19 GMT + ms-cv: + - ghCgc0nbM0uQl9liXllt6A.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T095318Z-z5w8hfkph50p97tr7b7ay90rp000000000a000000004vhzb + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 28ms + status: + code: 200 + message: OK +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_chat_list_participants.yaml b/src/communication/azext_communication/tests/latest/recordings/test_chat_list_participants.yaml new file mode 100644 index 00000000000..469242e0878 --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_chat_list_participants.yaml @@ -0,0 +1,148 @@ +interactions: +- request: + body: '{"createTokenWithScopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - kWpGozyV35fifbpKdY8mbdG64VG0Pdq5upzo7YKAFM0= + x-ms-date: + - Tue, 16 Aug 2022 09:53:16 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", + "expiresOn": "2022-08-17T09:53:18.3889107+00:00"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + connection: + - keep-alive + content-length: + - '122' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:53:18 GMT + ms-cv: + - VOiGUHi9KEWbhRtJWyMwCw.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T095318Z-0613xdc17h3t90gs2g8fdg5r64000000009g00000002kz18 + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 120ms + status: + code: 201 + message: Created +- request: + body: '{"topic": "some-topic", "participants": []}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '43' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + repeatability-request-id: + - 88b8134f-630e-43d1-8c2b-49296df38403 + method: POST + uri: https://sanitized.communication.azure.com/chat/threads?api-version=2021-09-07 + response: + body: + string: '{"chatThread": {"id": "sanitized", "topic": "some-topic", "createdOn": + "2022-08-16T09:53:18Z", "createdByCommunicationIdentifier": {"rawId": "sanitized", + "communicationUser": {"id": "sanitized"}}}}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:53:19 GMT + location: + - https://clitest000002.communication.azure.com/chat/threads/19%3A449sxqeIou_ORX2gyq6OroB61HEeGi3ptNJZnF3njbc1@thread.v2 + ms-cv: + - vWSbzNLGZU22eWwGkJCfKQ.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T095318Z-p18hf8s3dx4xf8cgexx53pe93400000000dg000000006452 + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 574ms + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://sanitized.communication.azure.com/chat/threads/sanitized/participants?api-version=2021-09-07 + response: + body: + string: '{"value": [{"communicationIdentifier": {"rawId": "8:acs:f22dc9a9-f255-4ae4-9d06-eac091136190_00000013-45f4-042e-7bfa-553a0d00f6a5", + "communicationUser": {"id": "8:acs:f22dc9a9-f255-4ae4-9d06-eac091136190_00000013-45f4-042e-7bfa-553a0d00f6a5"}}, + "shareHistoryTime": "1970-01-01T00:00:00Z"}]}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:53:20 GMT + ms-cv: + - E3DqbBJXPE+eaZEXVavEqw.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T095319Z-r0s9pbvvdt0w72q6sqrkc1ktpw00000005f000000002fd4g + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 154ms + status: + code: 200 + message: OK +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_chat_list_participants_bad_thread_id.yaml b/src/communication/azext_communication/tests/latest/recordings/test_chat_list_participants_bad_thread_id.yaml new file mode 100644 index 00000000000..18930f8398d --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_chat_list_participants_bad_thread_id.yaml @@ -0,0 +1,96 @@ +interactions: +- request: + body: '{"createTokenWithScopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - kWpGozyV35fifbpKdY8mbdG64VG0Pdq5upzo7YKAFM0= + x-ms-date: + - Tue, 16 Aug 2022 09:54:54 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", + "expiresOn": "2022-08-17T09:54:56.713839+00:00"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + connection: + - keep-alive + content-length: + - '121' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:54:56 GMT + ms-cv: + - d/3LsMaHt0up/aU5x/2K6w.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T095456Z-pvk0k4gqx51st0bh1fssf7cw3000000005gg00000000d6qh + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 127ms + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://sanitized.communication.azure.com/chat/threads/sanitized/participants?api-version=2021-09-07 + response: + body: + string: '{"CommunicationError": {"Code": "BadRequest", "Details": []}}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + connection: + - keep-alive + content-type: + - application/json + date: + - Tue, 16 Aug 2022 09:54:57 GMT + ms-cv: + - wKr9IFGVWk6uOmT+A81urQ.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T095457Z-hq6y7egy7x60fea7pte6x8g1v000000000e0000000016ngp + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 258ms + status: + code: 400 + message: Bad Request +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_chat_list_threads_no_endpoint.yaml b/src/communication/azext_communication/tests/latest/recordings/test_chat_list_threads_no_endpoint.yaml new file mode 100644 index 00000000000..7e901979e42 --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_chat_list_threads_no_endpoint.yaml @@ -0,0 +1,56 @@ +interactions: +- request: + body: '{"createTokenWithScopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - kWpGozyV35fifbpKdY8mbdG64VG0Pdq5upzo7YKAFM0= + x-ms-date: + - Tue, 16 Aug 2022 09:53:18 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", + "expiresOn": "2022-08-17T09:53:20.4727917+00:00"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + connection: + - keep-alive + content-length: + - '122' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:53:20 GMT + ms-cv: + - 7w+wrtryu0OJEGkvD8piwA.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T095320Z-vucxhh51rx5mv27fvss3h7q1kc00000000f000000000096b + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 127ms + status: + code: 201 + message: Created +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_chat_list_threads_with_cmdline_auth.yaml b/src/communication/azext_communication/tests/latest/recordings/test_chat_list_threads_with_cmdline_auth.yaml new file mode 100644 index 00000000000..87f5e89a9b2 --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_chat_list_threads_with_cmdline_auth.yaml @@ -0,0 +1,96 @@ +interactions: +- request: + body: '{"createTokenWithScopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - kWpGozyV35fifbpKdY8mbdG64VG0Pdq5upzo7YKAFM0= + x-ms-date: + - Tue, 16 Aug 2022 09:54:54 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", + "expiresOn": "2022-08-17T09:54:56.4513822+00:00"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + connection: + - keep-alive + content-length: + - '122' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:54:56 GMT + ms-cv: + - ZAil2r8C90WbyKJ4C8dqxQ.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T095456Z-ue5bcnvs3t2n5ee38b8kwchyq400000000dg00000000n45n + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 118ms + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://sanitized.communication.azure.com/chat/threads?api-version=2021-09-07 + response: + body: + string: '{"value": []}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:54:56 GMT + ms-cv: + - qKwCz2ppTEySjAqsWGleEA.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T095456Z-6b2s4uq0rt4yf0aehsw4te2apc00000000dg00000000esxg + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 76ms + status: + code: 200 + message: OK +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_chat_list_threads_with_env_auth.yaml b/src/communication/azext_communication/tests/latest/recordings/test_chat_list_threads_with_env_auth.yaml new file mode 100644 index 00000000000..30eabf8f4b4 --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_chat_list_threads_with_env_auth.yaml @@ -0,0 +1,96 @@ +interactions: +- request: + body: '{"createTokenWithScopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - kWpGozyV35fifbpKdY8mbdG64VG0Pdq5upzo7YKAFM0= + x-ms-date: + - Tue, 16 Aug 2022 09:54:54 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", + "expiresOn": "2022-08-17T09:54:56.4613628+00:00"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + connection: + - keep-alive + content-length: + - '122' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:54:56 GMT + ms-cv: + - 6cTtFagLx0auBFbZP6nS9Q.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T095456Z-0613xdc17h3t90gs2g8fdg5r64000000009g00000002mst9 + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 118ms + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://sanitized.communication.azure.com/chat/threads?api-version=2021-09-07 + response: + body: + string: '{"value": []}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:54:56 GMT + ms-cv: + - ebc36xJAdECr/KD2QhyA2Q.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T095456Z-z5w8hfkph50p97tr7b7ay90rp000000000ag00000003w0tc + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 15ms + status: + code: 200 + message: OK +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_chat_read_receipts.yaml b/src/communication/azext_communication/tests/latest/recordings/test_chat_read_receipts.yaml new file mode 100644 index 00000000000..33a71b967d6 --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_chat_read_receipts.yaml @@ -0,0 +1,269 @@ +interactions: +- request: + body: '{"createTokenWithScopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - kWpGozyV35fifbpKdY8mbdG64VG0Pdq5upzo7YKAFM0= + x-ms-date: + - Tue, 16 Aug 2022 09:56:30 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", + "expiresOn": "2022-08-17T09:56:32.6055699+00:00"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + content-length: + - '122' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:56:31 GMT + ms-cv: + - 2qF8WwwPiEyV+0T+R6tJew.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 00Gn7YgAAAAApg/79iVAtQ4kDSIFn4NkuWVZSMzExMDAwMTE1MDM1ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 117ms + status: + code: 201 + message: Created +- request: + body: '{"topic": "thread-topic", "participants": []}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '45' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + repeatability-request-id: + - 3ad13b1d-2bb9-452d-8616-22cd5374f49d + method: POST + uri: https://sanitized.communication.azure.com/chat/threads?api-version=2021-09-07 + response: + body: + string: '{"chatThread": {"id": "sanitized", "topic": "thread-topic", "createdOn": + "2022-08-16T09:56:33Z", "createdByCommunicationIdentifier": {"rawId": "sanitized", + "communicationUser": {"id": "sanitized"}}}}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:56:33 GMT + location: + - https://clitest000002.communication.azure.com/chat/threads/19%3AYnwEAcQrBLxuoUH2EoLEHvC50E8KOl7B-Kx_QYEyhdA1@thread.v2 + ms-cv: + - /8iVVjuG4kSUg9MUI5xM0A.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 00Wn7YgAAAACGRD6ctCT6S5q2bICQWa3jWVZSMzExMDAwMTE1MDE3ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 808ms + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://sanitized.communication.azure.com/chat/threads/sanitized/readReceipts?api-version=2021-09-07 + response: + body: + string: '{"value": []}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:56:33 GMT + ms-cv: + - patqpvvZlEq1obwUk5FoLA.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 00mn7YgAAAAAc6nR7XO+PSp80Ql76yI0HWVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE= + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 104ms + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://sanitized.communication.azure.com/chat/threads/sanitized/messages?api-version=2021-09-07 + response: + body: + string: '{"value": [{"id": "1660643793543", "type": "topicUpdated", "sequenceId": + "2", "version": "1660643793543", "content": {"topic": "thread-topic", "initiatorCommunicationIdentifier": + {"rawId": "8:acs:a5b1eb40-a0fe-45c8-b179-6c19dcc695b3_00000013-45f6-fad8-92fd-8b3a0d0020f5", + "communicationUser": {"id": "8:acs:a5b1eb40-a0fe-45c8-b179-6c19dcc695b3_00000013-45f6-fad8-92fd-8b3a0d0020f5"}}}, + "createdOn": "2022-08-16T09:56:33Z"}, {"id": "1660643793453", "type": "participantAdded", + "sequenceId": "1", "version": "1660643793453", "content": {"participants": + [{"communicationIdentifier": {"rawId": "8:acs:a5b1eb40-a0fe-45c8-b179-6c19dcc695b3_00000013-45f6-fad8-92fd-8b3a0d0020f5", + "communicationUser": {"id": "8:acs:a5b1eb40-a0fe-45c8-b179-6c19dcc695b3_00000013-45f6-fad8-92fd-8b3a0d0020f5"}}, + "shareHistoryTime": "1970-01-01T00:00:00Z"}], "initiatorCommunicationIdentifier": + {"rawId": "8:acs:a5b1eb40-a0fe-45c8-b179-6c19dcc695b3_00000013-45f6-fad8-92fd-8b3a0d0020f5", + "communicationUser": {"id": "8:acs:a5b1eb40-a0fe-45c8-b179-6c19dcc695b3_00000013-45f6-fad8-92fd-8b3a0d0020f5"}}}, + "createdOn": "2022-08-16T09:56:33Z"}]}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:56:34 GMT + ms-cv: + - hp/6FEnkEEKEV15ioPMxqg.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 00mn7YgAAAACvZwUhVxemQoCcuZ7Uh1DnWVZSMzBFREdFMDMxOQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE= + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 96ms + status: + code: 200 + message: OK +- request: + body: '{"chatMessageId": "1660643793543"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '34' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://sanitized.communication.azure.com/chat/threads/sanitized/readReceipts?api-version=2021-09-07 + response: + body: + string: '' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + content-length: + - '0' + date: + - Tue, 16 Aug 2022 09:56:35 GMT + ms-cv: + - gycFj9htB02cAonpPu5s3Q.0 + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 002n7YgAAAACOFKoAah90RbsJyEY6xHrXWVZSMzExMDAwMTE1MDQ3ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 285ms + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://sanitized.communication.azure.com/chat/threads/sanitized/readReceipts?api-version=2021-09-07 + response: + body: + string: '{"value": [{"senderCommunicationIdentifier": {"rawId": "8:acs:a5b1eb40-a0fe-45c8-b179-6c19dcc695b3_00000013-45f6-fad8-92fd-8b3a0d0020f5", + "communicationUser": {"id": "8:acs:a5b1eb40-a0fe-45c8-b179-6c19dcc695b3_00000013-45f6-fad8-92fd-8b3a0d0020f5"}}, + "chatMessageId": "1660643793543", "readOn": "2022-08-16T09:56:35Z"}]}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:56:36 GMT + ms-cv: + - ddcLSXpDCUiX2TgMRTwIYA.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 01Gn7YgAAAACL4l0gp8X2SbBdec9DzneMWVZSMzBFREdFMDMyMQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE= + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 89ms + status: + code: 200 + message: OK +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_chat_remove_participants.yaml b/src/communication/azext_communication/tests/latest/recordings/test_chat_remove_participants.yaml new file mode 100644 index 00000000000..d4745dd0ad5 --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_chat_remove_participants.yaml @@ -0,0 +1,374 @@ +interactions: +- request: + body: '{"createTokenWithScopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - kWpGozyV35fifbpKdY8mbdG64VG0Pdq5upzo7YKAFM0= + x-ms-date: + - Tue, 16 Aug 2022 09:54:53 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", + "expiresOn": "2022-08-17T09:54:55.2124074+00:00"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + connection: + - keep-alive + content-length: + - '122' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:54:55 GMT + ms-cv: + - 1e2ARk5CzkavIacmvZV8QA.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T095455Z-vucxhh51rx5mv27fvss3h7q1kc00000000f0000000001azg + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 121ms + status: + code: 201 + message: Created +- request: + body: '{"createTokenWithScopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - kWpGozyV35fifbpKdY8mbdG64VG0Pdq5upzo7YKAFM0= + x-ms-date: + - Tue, 16 Aug 2022 09:54:53 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", + "expiresOn": "2022-08-17T09:54:55.9111206+00:00"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + connection: + - keep-alive + content-length: + - '122' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:54:56 GMT + ms-cv: + - fPG1ZCPHlEWnq0qmqlEcOg.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T095455Z-r0s9pbvvdt0w72q6sqrkc1ktpw00000005f000000002gfd4 + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 125ms + status: + code: 201 + message: Created +- request: + body: '{"topic": "chat-topic", "participants": []}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '43' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + repeatability-request-id: + - 6577625c-c22d-47a1-b5e1-67e4f0abf778 + method: POST + uri: https://sanitized.communication.azure.com/chat/threads?api-version=2021-09-07 + response: + body: + string: '{"chatThread": {"id": "sanitized", "topic": "chat-topic", "createdOn": + "2022-08-16T09:54:56Z", "createdByCommunicationIdentifier": {"rawId": "sanitized", + "communicationUser": {"id": "sanitized"}}}}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:54:57 GMT + location: + - https://clitest000002.communication.azure.com/chat/threads/19%3A0snpJQWLgaXIQhZGbGG15TyCyRxNq_P_YpJvXq_HG041@thread.v2 + ms-cv: + - xUqHu94oUkqwBd5nfOGiYg.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T095456Z-p18hf8s3dx4xf8cgexx53pe93400000000dg000000009834 + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 656ms + status: + code: 201 + message: Created +- request: + body: '{"participants": [{"communicationIdentifier": {"communicationUser": {"id": + "8:acs:f9b74cf9-a58c-44f7-ab39-fe64b20bf5cf_00000013-45f5-8121-fa5d-573a0d000086"}}}]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '161' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://sanitized.communication.azure.com/chat/threads/sanitized/participants/:add?api-version=2021-09-07 + response: + body: + string: '{}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:54:57 GMT + ms-cv: + - U3ufTcXZaUmzg+QHBZ8b8A.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T095457Z-ue5bcnvs3t2n5ee38b8kwchyq400000000dg00000000bgcy + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 317ms + status: + code: 201 + message: Created +- request: + body: '{"communicationUser": {"id": "sanitized"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '42' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://sanitized.communication.azure.com/chat/threads/sanitized/participants/:remove?api-version=2021-09-07 + response: + body: + string: '' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + connection: + - keep-alive + date: + - Tue, 16 Aug 2022 09:54:58 GMT + ms-cv: + - +OzGDyKRxka+AvhDJGH6WQ.0 + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T095457Z-r0s9pbvvdt0w72q6sqrkc1ktpw00000005f000000002gg3g + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 234ms + status: + code: 204 + message: No Content +- request: + body: '{"communicationUser": {"id": "sanitized"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '42' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://sanitized.communication.azure.com/chat/threads/sanitized/participants/:remove?api-version=2021-09-07 + response: + body: + string: '{"CommunicationError": {"Code": "BadRequest", "Message": "Identifier + format is invalid (8:acs:fakeid).", "Details": []}}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + content-type: + - application/json + date: + - Tue, 16 Aug 2022 09:54:58 GMT + ms-cv: + - uT5bpxfzskmGLH+Y5l9zsA.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 0c2n7YgAAAAAKOMN67D21TppHJBcNQV5HWVZSMzBFREdFMDMxNQA5ZmM3YjUxOS1hOGNjLTRmODktOTM1ZS1jOTE0OGFlMDllODE= + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 20ms + status: + code: 400 + message: Bad Request +- request: + body: '{"communicationUser": {"id": "sanitized"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '42' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://sanitized.communication.azure.com/chat/threads/sanitized/participants/:remove?api-version=2021-09-07 + response: + body: + string: '' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + connection: + - keep-alive + date: + - Tue, 16 Aug 2022 09:54:59 GMT + ms-cv: + - BW0i3uP5WEGCmaWWxIwdhg.0 + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T095459Z-0613xdc17h3t90gs2g8fdg5r64000000009g000000029sw0 + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 154ms + status: + code: 204 + message: No Content +- request: + body: '{"communicationUser": {"id": "sanitized"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '42' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://sanitized.communication.azure.com/chat/threads/sanitized/participants/:remove?api-version=2021-09-07 + response: + body: + string: '{"CommunicationError": {"Code": "Forbidden", "Message": "The initiator + doesn''t have the permission to perform the requested operation.", "Details": + []}}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + connection: + - keep-alive + content-type: + - application/json + date: + - Tue, 16 Aug 2022 09:55:00 GMT + ms-cv: + - LrdvqCI0tkymfAcxHU4RMQ.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T095500Z-vucxhh51rx5mv27fvss3h7q1kc00000000f0000000000t05 + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 208ms + status: + code: 403 + message: Forbidden +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_chat_send_html_message.yaml b/src/communication/azext_communication/tests/latest/recordings/test_chat_send_html_message.yaml new file mode 100644 index 00000000000..4ac9d894b29 --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_chat_send_html_message.yaml @@ -0,0 +1,148 @@ +interactions: +- request: + body: '{"createTokenWithScopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - kWpGozyV35fifbpKdY8mbdG64VG0Pdq5upzo7YKAFM0= + x-ms-date: + - Tue, 16 Aug 2022 09:56:34 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", + "expiresOn": "2022-08-17T09:56:36.0751528+00:00"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + content-length: + - '122' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:56:35 GMT + ms-cv: + - hHK2tVfO1kaGj/iJqI7D8A.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 002n7YgAAAACa9/AdSTt2SI+y4z4wj2ORWVZSMzExMDAwMTE2MDUzADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 115ms + status: + code: 201 + message: Created +- request: + body: '{"topic": "yet-another-topic", "participants": []}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '50' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + repeatability-request-id: + - 04f06161-cbc2-498e-8978-719b48a7688b + method: POST + uri: https://sanitized.communication.azure.com/chat/threads?api-version=2021-09-07 + response: + body: + string: '{"chatThread": {"id": "sanitized", "topic": "yet-another-topic", "createdOn": + "2022-08-16T09:56:36Z", "createdByCommunicationIdentifier": {"rawId": "sanitized", + "communicationUser": {"id": "sanitized"}}}}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:56:36 GMT + location: + - https://clitest000002.communication.azure.com/chat/threads/19%3A0okX6AgAN72fC3WOouWhETNJ7jAv6WW-aP4bGk7kI581@thread.v2 + ms-cv: + - neIv9yJv20SnNlogTeyVWw.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 01Gn7YgAAAAA6zi5fJ8fxT4M+XvIVKfryWVZSMzExMDAwMTE1MDQ5ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 602ms + status: + code: 201 + message: Created +- request: + body: '{"content": "
hello!
", "type": "html"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '45' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://sanitized.communication.azure.com/chat/threads/sanitized/messages?api-version=2021-09-07 + response: + body: + string: '{"id": "sanitized"}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:56:37 GMT + location: + - https://clitest000002.communication.azure.com/chat/threads/19%3A0okX6AgAN72fC3WOouWhETNJ7jAv6WW-aP4bGk7kI581@thread.v2/messages/1660643797824 + ms-cv: + - qwdDxhXhDU6tuhI1kVo1Kw.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T095637Z-ue5bcnvs3t2n5ee38b8kwchyq400000000dg000000013hyd + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 204ms + status: + code: 201 + message: Created +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_chat_send_message.yaml b/src/communication/azext_communication/tests/latest/recordings/test_chat_send_message.yaml new file mode 100644 index 00000000000..3c5df4af0a5 --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_chat_send_message.yaml @@ -0,0 +1,146 @@ +interactions: +- request: + body: '{"createTokenWithScopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - kWpGozyV35fifbpKdY8mbdG64VG0Pdq5upzo7YKAFM0= + x-ms-date: + - Tue, 16 Aug 2022 09:56:31 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", + "expiresOn": "2022-08-17T09:56:33.569662+00:00"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + content-length: + - '121' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:56:32 GMT + ms-cv: + - 5PyTHTAtEUSLiD9fE043zQ.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 00Wn7YgAAAACm9EQeTIltQL4vOSuTeTCCWVZSMzExMDAwMTE2MDUzADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 116ms + status: + code: 201 + message: Created +- request: + body: '{"topic": "some-other-topic", "participants": []}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '49' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + repeatability-request-id: + - e177dda7-bcdb-4310-a743-56bb0b6ff940 + method: POST + uri: https://sanitized.communication.azure.com/chat/threads?api-version=2021-09-07 + response: + body: + string: '{"chatThread": {"id": "sanitized", "topic": "some-other-topic", "createdOn": + "2022-08-16T09:56:34Z", "createdByCommunicationIdentifier": {"rawId": "sanitized", + "communicationUser": {"id": "sanitized"}}}}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:56:34 GMT + location: + - https://clitest000002.communication.azure.com/chat/threads/19%3AVIBwC5MylRkJ0MF_NzexafZa4SFDGcZ0O46chAPlmjc1@thread.v2 + ms-cv: + - /0lGAQx5/ESgf4QAcQJ1Vw.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 00mn7YgAAAAC+Pr4+qA69S7fO3od6lEZLWVZSMzExMDAwMTE1MDA5ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 518ms + status: + code: 201 + message: Created +- request: + body: '{"content": "Hello!", "type": "text"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '37' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://sanitized.communication.azure.com/chat/threads/sanitized/messages?api-version=2021-09-07 + response: + body: + string: '{"id": "sanitized"}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:56:35 GMT + location: + - https://clitest000002.communication.azure.com/chat/threads/19%3AVIBwC5MylRkJ0MF_NzexafZa4SFDGcZ0O46chAPlmjc1@thread.v2/messages/1660643795886 + ms-cv: + - 5pLrUasYZUO1raMHFAUgtQ.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 002n7YgAAAAAZ6lUSFkNqSayAa+TUpCy/WVZSMzExMDAwMTE2MDMxADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 316ms + status: + code: 201 + message: Created +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_chat_send_message_without_content.yaml b/src/communication/azext_communication/tests/latest/recordings/test_chat_send_message_without_content.yaml new file mode 100644 index 00000000000..0e49a31743a --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_chat_send_message_without_content.yaml @@ -0,0 +1,102 @@ +interactions: +- request: + body: '{"createTokenWithScopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - kWpGozyV35fifbpKdY8mbdG64VG0Pdq5upzo7YKAFM0= + x-ms-date: + - Tue, 16 Aug 2022 09:56:30 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", + "expiresOn": "2022-08-17T09:56:33.1031918+00:00"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + content-length: + - '122' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:56:33 GMT + ms-cv: + - 3KP78okLO0OC8TyVUlQAAw.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 00Gn7YgAAAAApG/zgd+93T5ObTlTjuJkqWVZSMzExMDAwMTE2MDI1ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 135ms + status: + code: 201 + message: Created +- request: + body: '{"topic": "yet-another-topic", "participants": []}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '50' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + repeatability-request-id: + - 4db676e7-1ecc-4d64-861d-95428c0ef112 + method: POST + uri: https://sanitized.communication.azure.com/chat/threads?api-version=2021-09-07 + response: + body: + string: '{"chatThread": {"id": "sanitized", "topic": "yet-another-topic", "createdOn": + "2022-08-16T09:56:34Z", "createdByCommunicationIdentifier": {"rawId": "sanitized", + "communicationUser": {"id": "sanitized"}}}}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:56:34 GMT + location: + - https://clitest000002.communication.azure.com/chat/threads/19%3AwvrzYN4EccwlJH6HQ0Jom4CMLMxvWVXk_LAKLZF0_go1@thread.v2 + ms-cv: + - uPgzGXzew06HPsIfRtsOPg.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 00Wn7YgAAAABqJtBJ2SNFQIVYTh6IhQx3WVZSMzExMDAwMTE2MDM3ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 707ms + status: + code: 201 + message: Created +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_chat_send_text_message.yaml b/src/communication/azext_communication/tests/latest/recordings/test_chat_send_text_message.yaml new file mode 100644 index 00000000000..b8c812b8ca5 --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_chat_send_text_message.yaml @@ -0,0 +1,152 @@ +interactions: +- request: + body: '{"createTokenWithScopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - kWpGozyV35fifbpKdY8mbdG64VG0Pdq5upzo7YKAFM0= + x-ms-date: + - Tue, 16 Aug 2022 09:58:12 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", + "expiresOn": "2022-08-17T09:58:14.4875694+00:00"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + connection: + - keep-alive + content-length: + - '122' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:58:14 GMT + ms-cv: + - qDPbFi35YUKYM40AHhYnQQ.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T095814Z-zvdmwacghh4c97ggppewnyshxn00000000eg000000036ffq + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 129ms + status: + code: 201 + message: Created +- request: + body: '{"topic": "yet-another-topic", "participants": []}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '50' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + repeatability-request-id: + - e17a6379-b56d-41e7-95c0-fd8accb64032 + method: POST + uri: https://sanitized.communication.azure.com/chat/threads?api-version=2021-09-07 + response: + body: + string: '{"chatThread": {"id": "sanitized", "topic": "yet-another-topic", "createdOn": + "2022-08-16T09:58:15Z", "createdByCommunicationIdentifier": {"rawId": "sanitized", + "communicationUser": {"id": "sanitized"}}}}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:58:15 GMT + location: + - https://clitest000002.communication.azure.com/chat/threads/19%3AVOlNrrSfAnvUlIbV_ET8nzaR_UcryeMdAq_lLxj9XzM1@thread.v2 + ms-cv: + - N7Zs5jKM80O8BoRCouMuuw.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T095814Z-z5w8hfkph50p97tr7b7ay90rp000000000c000000000xfez + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 550ms + status: + code: 201 + message: Created +- request: + body: '{"content": "Hello!", "type": "text"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '37' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://sanitized.communication.azure.com/chat/threads/sanitized/messages?api-version=2021-09-07 + response: + body: + string: '{"id": "sanitized"}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:58:15 GMT + location: + - https://clitest000002.communication.azure.com/chat/threads/19%3AVOlNrrSfAnvUlIbV_ET8nzaR_UcryeMdAq_lLxj9XzM1@thread.v2/messages/1660643895843 + ms-cv: + - VSs+IufIMkKjw1sWgNMPHQ.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T095815Z-0613xdc17h3t90gs2g8fdg5r64000000009g00000001hdy1 + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 199ms + status: + code: 201 + message: Created +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_chat_update_message.yaml b/src/communication/azext_communication/tests/latest/recordings/test_chat_update_message.yaml new file mode 100644 index 00000000000..aeeca3989c9 --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_chat_update_message.yaml @@ -0,0 +1,192 @@ +interactions: +- request: + body: '{"createTokenWithScopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - kWpGozyV35fifbpKdY8mbdG64VG0Pdq5upzo7YKAFM0= + x-ms-date: + - Tue, 16 Aug 2022 09:58:09 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", + "expiresOn": "2022-08-17T09:58:11.6025564+00:00"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + connection: + - keep-alive + content-length: + - '122' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:58:11 GMT + ms-cv: + - WhtDLr1jiE+FNCYSlW59Mg.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T095811Z-r0s9pbvvdt0w72q6sqrkc1ktpw00000005f000000002kf3k + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 124ms + status: + code: 201 + message: Created +- request: + body: '{"topic": "thread-topic", "participants": []}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '45' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + repeatability-request-id: + - 28941290-0794-4d06-9e83-84ce0d30524a + method: POST + uri: https://sanitized.communication.azure.com/chat/threads?api-version=2021-09-07 + response: + body: + string: '{"chatThread": {"id": "sanitized", "topic": "thread-topic", "createdOn": + "2022-08-16T09:58:12Z", "createdByCommunicationIdentifier": {"rawId": "sanitized", + "communicationUser": {"id": "sanitized"}}}}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:58:12 GMT + location: + - https://clitest000002.communication.azure.com/chat/threads/19%3AyYLxTMKym5r9y97eVGBfWj2duAUU0GPmB2AorxyFhLE1@thread.v2 + ms-cv: + - W6KiMLoc60aImqPJYn8kww.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T095811Z-hq6y7egy7x60fea7pte6x8g1v000000000f000000000qax4 + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 427ms + status: + code: 201 + message: Created +- request: + body: '{"content": "Hello!", "type": "text"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '37' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + method: POST + uri: https://sanitized.communication.azure.com/chat/threads/sanitized/messages?api-version=2021-09-07 + response: + body: + string: '{"id": "sanitized"}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:58:13 GMT + location: + - https://clitest000002.communication.azure.com/chat/threads/19%3AyYLxTMKym5r9y97eVGBfWj2duAUU0GPmB2AorxyFhLE1@thread.v2/messages/1660643892983 + ms-cv: + - jHpTJiXnJ0uBxr8kC/41FA.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T095812Z-r0s9pbvvdt0w72q6sqrkc1ktpw00000005g0000000013gyh + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 167ms + status: + code: 201 + message: Created +- request: + body: '{"content": "Hello there!"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '27' + Content-Type: + - application/merge-patch+json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + method: PATCH + uri: https://sanitized.communication.azure.com/chat/threads/sanitized/messages/sanitized?api-version=2021-09-07 + response: + body: + string: '' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + connection: + - keep-alive + date: + - Tue, 16 Aug 2022 09:58:14 GMT + ms-cv: + - /D3SPjovbEqwrOxa95leXQ.0 + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T095813Z-pvk0k4gqx51st0bh1fssf7cw3000000005g000000000vcea + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 426ms + status: + code: 204 + message: No Content +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_chat_update_topic.yaml b/src/communication/azext_communication/tests/latest/recordings/test_chat_update_topic.yaml new file mode 100644 index 00000000000..edcdba66d68 --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_chat_update_topic.yaml @@ -0,0 +1,146 @@ +interactions: +- request: + body: '{"createTokenWithScopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - kWpGozyV35fifbpKdY8mbdG64VG0Pdq5upzo7YKAFM0= + x-ms-date: + - Tue, 16 Aug 2022 09:58:10 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", + "expiresOn": "2022-08-17T09:58:12.5511397+00:00"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + connection: + - keep-alive + content-length: + - '122' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:58:12 GMT + ms-cv: + - UhGgTN6ClUOU3hL8rLBUug.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T095812Z-z5w8hfkph50p97tr7b7ay90rp000000000ag00000003xdwg + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 122ms + status: + code: 201 + message: Created +- request: + body: '{"topic": "thread-topic", "participants": []}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '45' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + repeatability-request-id: + - 0f20495d-09b0-4eb1-8891-9a9a0f0fb375 + method: POST + uri: https://sanitized.communication.azure.com/chat/threads?api-version=2021-09-07 + response: + body: + string: '{"chatThread": {"id": "sanitized", "topic": "thread-topic", "createdOn": + "2022-08-16T09:58:13Z", "createdByCommunicationIdentifier": {"rawId": "sanitized", + "communicationUser": {"id": "sanitized"}}}}' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:58:13 GMT + location: + - https://clitest000002.communication.azure.com/chat/threads/19%3AGPmfjMrE_Mrn6CRNZzBhBA9I2jpjZ_xUxRCUViQ0Ocw1@thread.v2 + ms-cv: + - yO//0djuG0q7iDCOtmg/wA.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T095812Z-6b2s4uq0rt4yf0aehsw4te2apc00000000dg00000000pm1k + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 960ms + status: + code: 201 + message: Created +- request: + body: '{"topic": "new-topic!"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '23' + Content-Type: + - application/merge-patch+json + User-Agent: + - azsdk-python-communication-chat/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + method: PATCH + uri: https://sanitized.communication.azure.com/chat/threads/sanitized?api-version=2021-09-07 + response: + body: + string: '' + headers: + api-supported-versions: + - 2021-03-07, 2021-04-05-preview6, 2021-09-07, 2022-11-15-preview8 + connection: + - keep-alive + date: + - Tue, 16 Aug 2022 09:58:14 GMT + ms-cv: + - zajFbVGk30CrsPoquNO+FA.0 + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T095814Z-zvdmwacghh4c97ggppewnyshxn00000000fg00000001sx2s + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 243ms + status: + code: 204 + message: No Content +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_communication_Scenario.yaml b/src/communication/azext_communication/tests/latest/recordings/test_communication_scenario.yaml similarity index 62% rename from src/communication/azext_communication/tests/latest/recordings/test_communication_Scenario.yaml rename to src/communication/azext_communication/tests/latest/recordings/test_communication_scenario.yaml index f451e81f600..3835fe4616d 100644 --- a/src/communication/azext_communication/tests/latest/recordings/test_communication_Scenario.yaml +++ b/src/communication/azext_communication/tests/latest/recordings/test_communication_scenario.yaml @@ -17,26 +17,26 @@ interactions: ParameterSetName: - --name --location --data-location --resource-group User-Agent: - - AZURECLI/2.37.0 azsdk-python-mgmt-communication/1.0.0 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-communication/1.0.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001?api-version=2020-08-20 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001","name":"MyCommunica000001","type":"microsoft.communication/communicationservices","location":"Global","systemData":{"createdBy":"lakshmans@microsoft.com","createdByType":"User","createdAt":"2022-06-08T18:00:55.6740354Z","lastModifiedBy":"lakshmans@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-06-08T18:00:55.6740354Z"},"properties":{"dataLocation":"United + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001","name":"MyCommunica000001","type":"microsoft.communication/communicationservices","location":"Global","systemData":{"createdBy":"sanitized@microsoft.com","createdByType":"User","createdAt":"2022-08-16T10:04:19.6406836Z","lastModifiedBy":"sanitized@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-08-16T10:04:19.6406836Z"},"properties":{"dataLocation":"United States","provisioningState":"Accepted"}}' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/53c3d44f-cf97-48e3-8998-caa26343bec6*8D13F51CA89E2C4BB062051BF979196FAFD3CD94D8CFA098318864C914E2B960?api-version=2020-08-20 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/54c4181e-f238-4f84-8db1-fc9f7778eaa2*24F84614A94FF53828360F0278A761D5912EFEF54109BFBDCB4498690D714967?api-version=2020-08-20 cache-control: - no-cache content-length: - - '580' + - '578' content-type: - application/json; charset=utf-8 date: - - Wed, 08 Jun 2022 18:00:56 GMT + - Tue, 16 Aug 2022 10:04:19 GMT etag: - - '"75002503-0000-0700-0000-62a0e3d80000"' + - '"00004039-0000-0700-0000-62fb6ba40000"' expires: - '-1' pragma: @@ -50,7 +50,7 @@ interactions: x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 201 message: Created @@ -68,12 +68,12 @@ interactions: ParameterSetName: - --name --location --data-location --resource-group User-Agent: - - AZURECLI/2.37.0 azsdk-python-mgmt-communication/1.0.0 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-communication/1.0.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/53c3d44f-cf97-48e3-8998-caa26343bec6*8D13F51CA89E2C4BB062051BF979196FAFD3CD94D8CFA098318864C914E2B960?api-version=2020-08-20 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/54c4181e-f238-4f84-8db1-fc9f7778eaa2*24F84614A94FF53828360F0278A761D5912EFEF54109BFBDCB4498690D714967?api-version=2020-08-20 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/53c3d44f-cf97-48e3-8998-caa26343bec6*8D13F51CA89E2C4BB062051BF979196FAFD3CD94D8CFA098318864C914E2B960","name":"53c3d44f-cf97-48e3-8998-caa26343bec6*8D13F51CA89E2C4BB062051BF979196FAFD3CD94D8CFA098318864C914E2B960","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001","status":"Accepted","startTime":"2022-06-08T18:00:56.1908518Z"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/54c4181e-f238-4f84-8db1-fc9f7778eaa2*24F84614A94FF53828360F0278A761D5912EFEF54109BFBDCB4498690D714967","name":"54c4181e-f238-4f84-8db1-fc9f7778eaa2*24F84614A94FF53828360F0278A761D5912EFEF54109BFBDCB4498690D714967","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001","status":"Accepted","startTime":"2022-08-16T10:04:20.2079751Z"}' headers: cache-control: - no-cache @@ -82,9 +82,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 08 Jun 2022 18:01:26 GMT + - Tue, 16 Aug 2022 10:04:50 GMT etag: - - '"4200fb9d-0000-0800-0000-62a0e3d80000"' + - '"4b002074-0000-0800-0000-62fb6ba40000"' expires: - '-1' pragma: @@ -114,12 +114,12 @@ interactions: ParameterSetName: - --name --location --data-location --resource-group User-Agent: - - AZURECLI/2.37.0 azsdk-python-mgmt-communication/1.0.0 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-communication/1.0.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/53c3d44f-cf97-48e3-8998-caa26343bec6*8D13F51CA89E2C4BB062051BF979196FAFD3CD94D8CFA098318864C914E2B960?api-version=2020-08-20 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/54c4181e-f238-4f84-8db1-fc9f7778eaa2*24F84614A94FF53828360F0278A761D5912EFEF54109BFBDCB4498690D714967?api-version=2020-08-20 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/53c3d44f-cf97-48e3-8998-caa26343bec6*8D13F51CA89E2C4BB062051BF979196FAFD3CD94D8CFA098318864C914E2B960","name":"53c3d44f-cf97-48e3-8998-caa26343bec6*8D13F51CA89E2C4BB062051BF979196FAFD3CD94D8CFA098318864C914E2B960","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001","status":"Accepted","startTime":"2022-06-08T18:00:56.1908518Z"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/54c4181e-f238-4f84-8db1-fc9f7778eaa2*24F84614A94FF53828360F0278A761D5912EFEF54109BFBDCB4498690D714967","name":"54c4181e-f238-4f84-8db1-fc9f7778eaa2*24F84614A94FF53828360F0278A761D5912EFEF54109BFBDCB4498690D714967","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001","status":"Accepted","startTime":"2022-08-16T10:04:20.2079751Z"}' headers: cache-control: - no-cache @@ -128,9 +128,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 08 Jun 2022 18:01:56 GMT + - Tue, 16 Aug 2022 10:05:20 GMT etag: - - '"4200fb9d-0000-0800-0000-62a0e3d80000"' + - '"4b002074-0000-0800-0000-62fb6ba40000"' expires: - '-1' pragma: @@ -160,12 +160,12 @@ interactions: ParameterSetName: - --name --location --data-location --resource-group User-Agent: - - AZURECLI/2.37.0 azsdk-python-mgmt-communication/1.0.0 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-communication/1.0.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/53c3d44f-cf97-48e3-8998-caa26343bec6*8D13F51CA89E2C4BB062051BF979196FAFD3CD94D8CFA098318864C914E2B960?api-version=2020-08-20 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/54c4181e-f238-4f84-8db1-fc9f7778eaa2*24F84614A94FF53828360F0278A761D5912EFEF54109BFBDCB4498690D714967?api-version=2020-08-20 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/53c3d44f-cf97-48e3-8998-caa26343bec6*8D13F51CA89E2C4BB062051BF979196FAFD3CD94D8CFA098318864C914E2B960","name":"53c3d44f-cf97-48e3-8998-caa26343bec6*8D13F51CA89E2C4BB062051BF979196FAFD3CD94D8CFA098318864C914E2B960","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001","status":"Succeeded","startTime":"2022-06-08T18:00:56.1908518Z","properties":null}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/54c4181e-f238-4f84-8db1-fc9f7778eaa2*24F84614A94FF53828360F0278A761D5912EFEF54109BFBDCB4498690D714967","name":"54c4181e-f238-4f84-8db1-fc9f7778eaa2*24F84614A94FF53828360F0278A761D5912EFEF54109BFBDCB4498690D714967","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001","status":"Succeeded","startTime":"2022-08-16T10:04:20.2079751Z","properties":null}' headers: cache-control: - no-cache @@ -174,9 +174,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 08 Jun 2022 18:02:26 GMT + - Tue, 16 Aug 2022 10:05:50 GMT etag: - - '"4200339e-0000-0800-0000-62a0e41a0000"' + - '"170019b2-0000-0100-0000-62fb6be60000"' expires: - '-1' pragma: @@ -206,24 +206,24 @@ interactions: ParameterSetName: - --name --location --data-location --resource-group User-Agent: - - AZURECLI/2.37.0 azsdk-python-mgmt-communication/1.0.0 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-communication/1.0.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001?api-version=2020-08-20 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001","name":"MyCommunica000001","type":"microsoft.communication/communicationservices","location":"Global","systemData":{"createdBy":"lakshmans@microsoft.com","createdByType":"User","createdAt":"2022-06-08T18:00:55.6740354Z","lastModifiedBy":"lakshmans@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-06-08T18:00:55.6740354Z"},"properties":{"provisioningState":"Succeeded","hostName":"mycommunica2mrpbter43mx.communication.azure.com","immutableResourceId":"fa754975-e1ac-4b98-b487-3a2bf7ca2477","dataLocation":"United + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001","name":"MyCommunica000001","type":"microsoft.communication/communicationservices","location":"Global","systemData":{"createdBy":"sanitized@microsoft.com","createdByType":"User","createdAt":"2022-08-16T10:04:19.6406836Z","lastModifiedBy":"sanitized@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-08-16T10:04:19.6406836Z"},"properties":{"provisioningState":"Succeeded","hostName":"mycommunicas4i5mkqz3v7l.communication.azure.com","immutableResourceId":"57b92965-9359-451b-a4a8-e5d99fefec14","dataLocation":"United States"}}' headers: cache-control: - no-cache content-length: - - '703' + - '701' content-type: - application/json; charset=utf-8 date: - - Wed, 08 Jun 2022 18:02:26 GMT + - Tue, 16 Aug 2022 10:05:50 GMT etag: - - '"75004b03-0000-0700-0000-62a0e3de0000"' + - '"00007339-0000-0700-0000-62fb6bab0000"' expires: - '-1' pragma: @@ -255,24 +255,24 @@ interactions: ParameterSetName: - --created --name --resource-group User-Agent: - - AZURECLI/2.37.0 azsdk-python-mgmt-communication/1.0.0 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-communication/1.0.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001?api-version=2020-08-20 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001","name":"MyCommunica000001","type":"microsoft.communication/communicationservices","location":"Global","systemData":{"createdBy":"lakshmans@microsoft.com","createdByType":"User","createdAt":"2022-06-08T18:00:55.6740354Z","lastModifiedBy":"lakshmans@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-06-08T18:00:55.6740354Z"},"properties":{"provisioningState":"Succeeded","hostName":"mycommunica2mrpbter43mx.communication.azure.com","immutableResourceId":"fa754975-e1ac-4b98-b487-3a2bf7ca2477","dataLocation":"United + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001","name":"MyCommunica000001","type":"microsoft.communication/communicationservices","location":"Global","systemData":{"createdBy":"sanitized@microsoft.com","createdByType":"User","createdAt":"2022-08-16T10:04:19.6406836Z","lastModifiedBy":"sanitized@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-08-16T10:04:19.6406836Z"},"properties":{"provisioningState":"Succeeded","hostName":"mycommunicas4i5mkqz3v7l.communication.azure.com","immutableResourceId":"57b92965-9359-451b-a4a8-e5d99fefec14","dataLocation":"United States"}}' headers: cache-control: - no-cache content-length: - - '703' + - '701' content-type: - application/json; charset=utf-8 date: - - Wed, 08 Jun 2022 18:02:27 GMT + - Tue, 16 Aug 2022 10:05:51 GMT etag: - - '"75004b03-0000-0700-0000-62a0e3de0000"' + - '"00007339-0000-0700-0000-62fb6bab0000"' expires: - '-1' pragma: @@ -304,24 +304,24 @@ interactions: ParameterSetName: - --name --resource-group User-Agent: - - AZURECLI/2.37.0 azsdk-python-mgmt-communication/1.0.0 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-communication/1.0.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001?api-version=2020-08-20 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001","name":"MyCommunica000001","type":"microsoft.communication/communicationservices","location":"Global","systemData":{"createdBy":"lakshmans@microsoft.com","createdByType":"User","createdAt":"2022-06-08T18:00:55.6740354Z","lastModifiedBy":"lakshmans@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-06-08T18:00:55.6740354Z"},"properties":{"provisioningState":"Succeeded","hostName":"mycommunica2mrpbter43mx.communication.azure.com","immutableResourceId":"fa754975-e1ac-4b98-b487-3a2bf7ca2477","dataLocation":"United + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001","name":"MyCommunica000001","type":"microsoft.communication/communicationservices","location":"Global","systemData":{"createdBy":"sanitized@microsoft.com","createdByType":"User","createdAt":"2022-08-16T10:04:19.6406836Z","lastModifiedBy":"sanitized@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-08-16T10:04:19.6406836Z"},"properties":{"provisioningState":"Succeeded","hostName":"mycommunicas4i5mkqz3v7l.communication.azure.com","immutableResourceId":"57b92965-9359-451b-a4a8-e5d99fefec14","dataLocation":"United States"}}' headers: cache-control: - no-cache content-length: - - '703' + - '701' content-type: - application/json; charset=utf-8 date: - - Wed, 08 Jun 2022 18:02:28 GMT + - Tue, 16 Aug 2022 10:05:51 GMT etag: - - '"75004b03-0000-0700-0000-62a0e3de0000"' + - '"00007339-0000-0700-0000-62fb6bab0000"' expires: - '-1' pragma: @@ -353,22 +353,69 @@ interactions: ParameterSetName: - --resource-group User-Agent: - - AZURECLI/2.37.0 azsdk-python-mgmt-communication/1.0.0 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-communication/1.0.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices?api-version=2020-08-20 + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001","name":"MyCommunica000001","type":"microsoft.communication/communicationservices","location":"Global","systemData":{"createdBy":"sanitized@microsoft.com","createdByType":"User","createdAt":"2022-08-16T10:04:19.6406836Z","lastModifiedBy":"sanitized@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-08-16T10:04:19.6406836Z"},"properties":{"provisioningState":"Succeeded","hostName":"mycommunicas4i5mkqz3v7l.communication.azure.com","immutableResourceId":"57b92965-9359-451b-a4a8-e5d99fefec14","dataLocation":"United + States"}}]}' + headers: + cache-control: + - no-cache + content-length: + - '713' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 10:05:51 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-providerhub-traffic: + - 'True' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + CommandName: + - communication list + Connection: + - keep-alive + ParameterSetName: + - -g + User-Agent: + - AZURECLI/2.38.0 azsdk-python-mgmt-communication/1.0.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices?api-version=2020-08-20 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001","name":"MyCommunica000001","type":"microsoft.communication/communicationservices","location":"Global","systemData":{"createdBy":"lakshmans@microsoft.com","createdByType":"User","createdAt":"2022-06-08T18:00:55.6740354Z","lastModifiedBy":"lakshmans@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-06-08T18:00:55.6740354Z"},"properties":{"provisioningState":"Succeeded","hostName":"mycommunica2mrpbter43mx.communication.azure.com","immutableResourceId":"fa754975-e1ac-4b98-b487-3a2bf7ca2477","dataLocation":"United + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001","name":"MyCommunica000001","type":"microsoft.communication/communicationservices","location":"Global","systemData":{"createdBy":"sanitized@microsoft.com","createdByType":"User","createdAt":"2022-08-16T10:04:19.6406836Z","lastModifiedBy":"sanitized@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-08-16T10:04:19.6406836Z"},"properties":{"provisioningState":"Succeeded","hostName":"mycommunicas4i5mkqz3v7l.communication.azure.com","immutableResourceId":"57b92965-9359-451b-a4a8-e5d99fefec14","dataLocation":"United States"}}]}' headers: cache-control: - no-cache content-length: - - '715' + - '713' content-type: - application/json; charset=utf-8 date: - - Wed, 08 Jun 2022 18:02:28 GMT + - Tue, 16 Aug 2022 10:05:52 GMT expires: - '-1' pragma: @@ -404,24 +451,24 @@ interactions: ParameterSetName: - --name --tags --resource-group User-Agent: - - AZURECLI/2.37.0 azsdk-python-mgmt-communication/1.0.0 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-communication/1.0.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001?api-version=2020-08-20 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001","name":"MyCommunica000001","type":"microsoft.communication/communicationservices","location":"Global","tags":{"newTag":"newVal"},"systemData":{"createdBy":"lakshmans@microsoft.com","createdByType":"User","createdAt":"2022-06-08T18:00:55.6740354Z","lastModifiedBy":"lakshmans@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-06-08T18:02:29.625223Z"},"properties":{"hostName":"mycommunica2mrpbter43mx.communication.azure.com","immutableResourceId":"fa754975-e1ac-4b98-b487-3a2bf7ca2477","dataLocation":"United + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001","name":"MyCommunica000001","type":"microsoft.communication/communicationservices","location":"Global","tags":{"newTag":"newVal"},"systemData":{"createdBy":"sanitized@microsoft.com","createdByType":"User","createdAt":"2022-08-16T10:04:19.6406836Z","lastModifiedBy":"sanitized@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2022-08-16T10:05:53.3716978Z"},"properties":{"hostName":"mycommunicas4i5mkqz3v7l.communication.azure.com","immutableResourceId":"57b92965-9359-451b-a4a8-e5d99fefec14","dataLocation":"United States","provisioningState":"Succeeded"}}' headers: cache-control: - no-cache content-length: - - '729' + - '728' content-type: - application/json; charset=utf-8 date: - - Wed, 08 Jun 2022 18:02:29 GMT + - Tue, 16 Aug 2022 10:05:53 GMT etag: - - '"75006104-0000-0700-0000-62a0e4360000"' + - '"0000e239-0000-0700-0000-62fb6c010000"' expires: - '-1' pragma: @@ -462,7 +509,7 @@ interactions: ParameterSetName: - --name --connection-string --resource-id --resource-group User-Agent: - - AZURECLI/2.37.0 azsdk-python-mgmt-communication/1.0.0 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-communication/1.0.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001/linkNotificationHub?api-version=2020-08-20 response: @@ -476,7 +523,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 08 Jun 2022 18:02:31 GMT + - Tue, 16 Aug 2022 10:05:55 GMT expires: - '-1' pragma: @@ -494,7 +541,7 @@ interactions: x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 200 message: OK @@ -514,12 +561,12 @@ interactions: ParameterSetName: - --name --resource-group User-Agent: - - AZURECLI/2.37.0 azsdk-python-mgmt-communication/1.0.0 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-communication/1.0.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001/listKeys?api-version=2020-08-20 response: body: - string: '{"primaryKey":"XXXXXXXX","secondaryKey":"XXXXXXXX","primaryConnectionString":"endpoint=https://mycommunica2mrpbter43mx.communication.azure.com/;accesskey=XXXXXXXX","secondaryConnectionString":"endpoint=https://mycommunica2mrpbter43mx.communication.azure.com/;accesskey=XXXXXXXX"}' + string: '{"primaryKey":"UaeGEOhiyNUWw+Y9ZKvgsmenpHCCSHY13q6zP6QyKj98czq66nVlTsqKwfzI4+7iytBQKWZ41H8YeqTvpJYrfQ==","secondaryKey":"ew75lvU6WkBiy27dw69xbBkW2I7kr+T30DR/k+HfpcQ81iRSDdktmgXKsWRhgfkWhnpFf6T8XNAwbIyBoqtrUQ==","primaryConnectionString":"endpoint=https://mycommunicas4i5mkqz3v7l.communication.azure.com/;accesskey=UaeGEOhiyNUWw+Y9ZKvgsmenpHCCSHY13q6zP6QyKj98czq66nVlTsqKwfzI4+7iytBQKWZ41H8YeqTvpJYrfQ==","secondaryConnectionString":"endpoint=https://mycommunicas4i5mkqz3v7l.communication.azure.com/;accesskey=ew75lvU6WkBiy27dw69xbBkW2I7kr+T30DR/k+HfpcQ81iRSDdktmgXKsWRhgfkWhnpFf6T8XNAwbIyBoqtrUQ=="}' headers: cache-control: - no-cache @@ -528,7 +575,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 08 Jun 2022 18:02:32 GMT + - Tue, 16 Aug 2022 10:05:55 GMT expires: - '-1' pragma: @@ -546,7 +593,7 @@ interactions: x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 200 message: OK @@ -568,12 +615,12 @@ interactions: ParameterSetName: - --name --key-type --resource-group User-Agent: - - AZURECLI/2.37.0 azsdk-python-mgmt-communication/1.0.0 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-communication/1.0.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001/regenerateKey?api-version=2020-08-20 response: body: - string: '{"primaryKey":"XXXXXXXX","primaryConnectionString":"endpoint=https://mycommunica2mrpbter43mx.communication.azure.com/;accesskey=XXXXXXXX"}' + string: '{"primaryKey":"j1o+ZM3aWS831v/h6gNrK8N0SKzKPf2bB9lGA7/zx0Ai/dbTwigHij1iuzNfC70mcSoj4R+YJdrNZHtUD6RzKQ==","primaryConnectionString":"endpoint=https://mycommunicas4i5mkqz3v7l.communication.azure.com/;accesskey=j1o+ZM3aWS831v/h6gNrK8N0SKzKPf2bB9lGA7/zx0Ai/dbTwigHij1iuzNfC70mcSoj4R+YJdrNZHtUD6RzKQ=="}' headers: cache-control: - no-cache @@ -582,7 +629,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 08 Jun 2022 18:02:33 GMT + - Tue, 16 Aug 2022 10:05:56 GMT expires: - '-1' pragma: @@ -600,7 +647,7 @@ interactions: x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1197' status: code: 200 message: OK @@ -620,7 +667,7 @@ interactions: ParameterSetName: - -y --name --resource-group User-Agent: - - AZURECLI/2.37.0 azsdk-python-mgmt-communication/1.0.0 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-communication/1.0.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001?api-version=2020-08-20 response: @@ -628,7 +675,7 @@ interactions: string: 'null' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/1ec93f0b-63ae-47b0-8885-8ccd059c2a98*8D13F51CA89E2C4BB062051BF979196FAFD3CD94D8CFA098318864C914E2B960?api-version=2020-08-20 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/9257ef14-ed61-4317-93e8-1d546171eb10*24F84614A94FF53828360F0278A761D5912EFEF54109BFBDCB4498690D714967?api-version=2020-08-20 cache-control: - no-cache content-length: @@ -636,13 +683,13 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 08 Jun 2022 18:02:34 GMT + - Tue, 16 Aug 2022 10:05:57 GMT etag: - - '"75007304-0000-0700-0000-62a0e43a0000"' + - '"0000e739-0000-0700-0000-62fb6c050000"' expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/1ec93f0b-63ae-47b0-8885-8ccd059c2a98*8D13F51CA89E2C4BB062051BF979196FAFD3CD94D8CFA098318864C914E2B960?api-version=2020-08-20 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/9257ef14-ed61-4317-93e8-1d546171eb10*24F84614A94FF53828360F0278A761D5912EFEF54109BFBDCB4498690D714967?api-version=2020-08-20 pragma: - no-cache strict-transport-security: @@ -652,7 +699,7 @@ interactions: x-ms-providerhub-traffic: - 'True' x-ms-ratelimit-remaining-subscription-deletes: - - '14999' + - '14998' status: code: 202 message: Accepted @@ -670,12 +717,12 @@ interactions: ParameterSetName: - -y --name --resource-group User-Agent: - - AZURECLI/2.37.0 azsdk-python-mgmt-communication/1.0.0 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-communication/1.0.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/1ec93f0b-63ae-47b0-8885-8ccd059c2a98*8D13F51CA89E2C4BB062051BF979196FAFD3CD94D8CFA098318864C914E2B960?api-version=2020-08-20 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/9257ef14-ed61-4317-93e8-1d546171eb10*24F84614A94FF53828360F0278A761D5912EFEF54109BFBDCB4498690D714967?api-version=2020-08-20 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/1ec93f0b-63ae-47b0-8885-8ccd059c2a98*8D13F51CA89E2C4BB062051BF979196FAFD3CD94D8CFA098318864C914E2B960","name":"1ec93f0b-63ae-47b0-8885-8ccd059c2a98*8D13F51CA89E2C4BB062051BF979196FAFD3CD94D8CFA098318864C914E2B960","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001","status":"Deleting","startTime":"2022-06-08T18:02:34.5102735Z"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/9257ef14-ed61-4317-93e8-1d546171eb10*24F84614A94FF53828360F0278A761D5912EFEF54109BFBDCB4498690D714967","name":"9257ef14-ed61-4317-93e8-1d546171eb10*24F84614A94FF53828360F0278A761D5912EFEF54109BFBDCB4498690D714967","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001","status":"Deleting","startTime":"2022-08-16T10:05:57.5507433Z"}' headers: cache-control: - no-cache @@ -684,9 +731,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 08 Jun 2022 18:03:04 GMT + - Tue, 16 Aug 2022 10:06:27 GMT etag: - - '"4200689e-0000-0800-0000-62a0e43a0000"' + - '"4b00a476-0000-0800-0000-62fb6c050000"' expires: - '-1' pragma: @@ -712,12 +759,12 @@ interactions: ParameterSetName: - -y --name --resource-group User-Agent: - - AZURECLI/2.37.0 azsdk-python-mgmt-communication/1.0.0 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-communication/1.0.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/1ec93f0b-63ae-47b0-8885-8ccd059c2a98*8D13F51CA89E2C4BB062051BF979196FAFD3CD94D8CFA098318864C914E2B960?api-version=2020-08-20 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/9257ef14-ed61-4317-93e8-1d546171eb10*24F84614A94FF53828360F0278A761D5912EFEF54109BFBDCB4498690D714967?api-version=2020-08-20 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/1ec93f0b-63ae-47b0-8885-8ccd059c2a98*8D13F51CA89E2C4BB062051BF979196FAFD3CD94D8CFA098318864C914E2B960","name":"1ec93f0b-63ae-47b0-8885-8ccd059c2a98*8D13F51CA89E2C4BB062051BF979196FAFD3CD94D8CFA098318864C914E2B960","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001","status":"Deleting","startTime":"2022-06-08T18:02:34.5102735Z"}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/9257ef14-ed61-4317-93e8-1d546171eb10*24F84614A94FF53828360F0278A761D5912EFEF54109BFBDCB4498690D714967","name":"9257ef14-ed61-4317-93e8-1d546171eb10*24F84614A94FF53828360F0278A761D5912EFEF54109BFBDCB4498690D714967","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001","status":"Deleting","startTime":"2022-08-16T10:05:57.5507433Z"}' headers: cache-control: - no-cache @@ -726,9 +773,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 08 Jun 2022 18:03:34 GMT + - Tue, 16 Aug 2022 10:06:57 GMT etag: - - '"4200689e-0000-0800-0000-62a0e43a0000"' + - '"4b00a476-0000-0800-0000-62fb6c050000"' expires: - '-1' pragma: @@ -754,12 +801,12 @@ interactions: ParameterSetName: - -y --name --resource-group User-Agent: - - AZURECLI/2.37.0 azsdk-python-mgmt-communication/1.0.0 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-communication/1.0.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/1ec93f0b-63ae-47b0-8885-8ccd059c2a98*8D13F51CA89E2C4BB062051BF979196FAFD3CD94D8CFA098318864C914E2B960?api-version=2020-08-20 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/9257ef14-ed61-4317-93e8-1d546171eb10*24F84614A94FF53828360F0278A761D5912EFEF54109BFBDCB4498690D714967?api-version=2020-08-20 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/1ec93f0b-63ae-47b0-8885-8ccd059c2a98*8D13F51CA89E2C4BB062051BF979196FAFD3CD94D8CFA098318864C914E2B960","name":"1ec93f0b-63ae-47b0-8885-8ccd059c2a98*8D13F51CA89E2C4BB062051BF979196FAFD3CD94D8CFA098318864C914E2B960","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001","status":"Succeeded","startTime":"2022-06-08T18:02:34.5102735Z","properties":null}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/9257ef14-ed61-4317-93e8-1d546171eb10*24F84614A94FF53828360F0278A761D5912EFEF54109BFBDCB4498690D714967","name":"9257ef14-ed61-4317-93e8-1d546171eb10*24F84614A94FF53828360F0278A761D5912EFEF54109BFBDCB4498690D714967","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001","status":"Succeeded","startTime":"2022-08-16T10:05:57.5507433Z","properties":null}' headers: cache-control: - no-cache @@ -768,9 +815,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 08 Jun 2022 18:04:04 GMT + - Tue, 16 Aug 2022 10:07:27 GMT etag: - - '"4200b59e-0000-0800-0000-62a0e47c0000"' + - '"4b00db77-0000-0800-0000-62fb6c470000"' expires: - '-1' pragma: @@ -800,12 +847,12 @@ interactions: ParameterSetName: - -y --name --resource-group User-Agent: - - AZURECLI/2.37.0 azsdk-python-mgmt-communication/1.0.0 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - AZURECLI/2.38.0 azsdk-python-mgmt-communication/1.0.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/1ec93f0b-63ae-47b0-8885-8ccd059c2a98*8D13F51CA89E2C4BB062051BF979196FAFD3CD94D8CFA098318864C914E2B960?api-version=2020-08-20 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/9257ef14-ed61-4317-93e8-1d546171eb10*24F84614A94FF53828360F0278A761D5912EFEF54109BFBDCB4498690D714967?api-version=2020-08-20 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/1ec93f0b-63ae-47b0-8885-8ccd059c2a98*8D13F51CA89E2C4BB062051BF979196FAFD3CD94D8CFA098318864C914E2B960","name":"1ec93f0b-63ae-47b0-8885-8ccd059c2a98*8D13F51CA89E2C4BB062051BF979196FAFD3CD94D8CFA098318864C914E2B960","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001","status":"Succeeded","startTime":"2022-06-08T18:02:34.5102735Z","properties":null}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Communication/locations/WESTUS2/operationStatuses/9257ef14-ed61-4317-93e8-1d546171eb10*24F84614A94FF53828360F0278A761D5912EFEF54109BFBDCB4498690D714967","name":"9257ef14-ed61-4317-93e8-1d546171eb10*24F84614A94FF53828360F0278A761D5912EFEF54109BFBDCB4498690D714967","resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest000003/providers/Microsoft.Communication/communicationServices/MyCommunica000001","status":"Succeeded","startTime":"2022-08-16T10:05:57.5507433Z","properties":null}' headers: cache-control: - no-cache @@ -814,9 +861,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 08 Jun 2022 18:04:04 GMT + - Tue, 16 Aug 2022 10:07:27 GMT etag: - - '"4200b59e-0000-0800-0000-62a0e47c0000"' + - '"4b00db77-0000-0800-0000-62fb6c470000"' expires: - '-1' pragma: diff --git a/src/communication/azext_communication/tests/latest/recordings/test_create_user.yaml b/src/communication/azext_communication/tests/latest/recordings/test_create_user.yaml new file mode 100644 index 00000000000..4e7d235a51b --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_create_user.yaml @@ -0,0 +1,55 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - RBNvo1WzZ4oRRq0W9+hknpT7T8If536DEMBg9hyq/4o= + x-ms-date: + - Tue, 16 Aug 2022 09:58:11 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + connection: + - keep-alive + content-length: + - '33' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:58:13 GMT + ms-cv: + - 11DkwBKNQEG7Y8S+VbHRqQ.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T095813Z-r0s9pbvvdt0w72q6sqrkc1ktpw00000005f000000002kfsc + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 127ms + status: + code: 201 + message: Created +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_delete_user.yaml b/src/communication/azext_communication/tests/latest/recordings/test_delete_user.yaml new file mode 100644 index 00000000000..06e9bae5001 --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_delete_user.yaml @@ -0,0 +1,102 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - RBNvo1WzZ4oRRq0W9+hknpT7T8If536DEMBg9hyq/4o= + x-ms-date: + - Tue, 16 Aug 2022 09:59:47 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + connection: + - keep-alive + content-length: + - '33' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:59:49 GMT + ms-cv: + - gFoJR4TIm0ejsosKMnxJ7Q.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T095949Z-ue5bcnvs3t2n5ee38b8kwchyq400000000dg000000015vfh + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 120ms + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= + x-ms-date: + - Tue, 16 Aug 2022 09:59:48 GMT + x-ms-return-client-request-id: + - 'true' + method: DELETE + uri: https://sanitized.communication.azure.com/identities/sanitized?api-version=2022-06-01 + response: + body: + string: '' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + connection: + - keep-alive + date: + - Tue, 16 Aug 2022 09:59:50 GMT + ms-cv: + - XZXOKIqDzE2QUUtqG3QuOw.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T095949Z-p18hf8s3dx4xf8cgexx53pe93400000000dg0000000056hv + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 215ms + status: + code: 204 + message: No Content +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_issue_access_token.yaml b/src/communication/azext_communication/tests/latest/recordings/test_issue_access_token.yaml index 39de6eeaae6..33ec1ae06e3 100644 --- a/src/communication/azext_communication/tests/latest/recordings/test_issue_access_token.yaml +++ b/src/communication/azext_communication/tests/latest/recordings/test_issue_access_token.yaml @@ -12,42 +12,44 @@ interactions: - '35' Content-Type: - application/json - Date: - - Wed, 08 Jun 2022 18:00:51 GMT User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - kWpGozyV35fifbpKdY8mbdG64VG0Pdq5upzo7YKAFM0= + x-ms-date: + - Tue, 16 Aug 2022 09:59:48 GMT x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.communication.azure.com/identities?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 response: body: string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", - "expiresOn": "2022-06-09T18:00:51.176298+00:00"}}' + "expiresOn": "2022-08-17T09:59:50.2517087+00:00"}}' headers: api-supported-versions: - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, 2021-11-01, 2022-06-01 + connection: + - keep-alive content-length: - - '121' + - '122' content-type: - application/json; charset=utf-8 date: - - Wed, 08 Jun 2022 18:00:50 GMT + - Tue, 16 Aug 2022 09:59:50 GMT ms-cv: - - eElIgNeTt0O5mbftDOJZFQ.0 + - eUR1vMVBokSAp9TYSwkWKw.0 request-context: - appId= strict-transport-security: - max-age=2592000 x-azure-ref: - - 00uOgYgAAAAANw4rItbYIRri9LyqlAuPbWVZSMzExMDAwMTE2MDIxADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + - 20220816T095950Z-6b2s4uq0rt4yf0aehsw4te2apc00000000dg00000000wzwf x-cache: - CONFIG_NOCACHE x-processing-time: - - 186ms + - 144ms status: code: 201 message: Created diff --git a/src/communication/azext_communication/tests/latest/recordings/test_issue_access_token_with_id.yaml b/src/communication/azext_communication/tests/latest/recordings/test_issue_access_token_with_id.yaml index ef861c00c3e..40609fa10de 100644 --- a/src/communication/azext_communication/tests/latest/recordings/test_issue_access_token_with_id.yaml +++ b/src/communication/azext_communication/tests/latest/recordings/test_issue_access_token_with_id.yaml @@ -12,16 +12,16 @@ interactions: - '2' Content-Type: - application/json - Date: - - Wed, 08 Jun 2022 18:00:51 GMT User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - RBNvo1WzZ4oRRq0W9+hknpT7T8If536DEMBg9hyq/4o= + x-ms-date: + - Tue, 16 Aug 2022 09:59:49 GMT x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.communication.azure.com/identities?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 response: body: string: '{"identity": {"id": "sanitized"}}' @@ -29,24 +29,26 @@ interactions: api-supported-versions: - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, 2021-11-01, 2022-06-01 + connection: + - keep-alive content-length: - '33' content-type: - application/json; charset=utf-8 date: - - Wed, 08 Jun 2022 18:00:51 GMT + - Tue, 16 Aug 2022 09:59:51 GMT ms-cv: - - l2JTnDME60aMsbUTOQuXKQ.0 + - fOWnuTGPGE+mfuP3vwht5w.0 request-context: - appId= strict-transport-security: - max-age=2592000 x-azure-ref: - - 00uOgYgAAAADuzh9y4GprTpDLQ3dRPhyNWVZSMzExMDAwMTE2MDIzADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + - 20220816T095951Z-ue5bcnvs3t2n5ee38b8kwchyq400000000dg000000015w66 x-cache: - CONFIG_NOCACHE x-processing-time: - - 109ms + - 119ms status: code: 201 message: Created @@ -63,41 +65,45 @@ interactions: - '20' Content-Type: - application/json - Date: - - Wed, 08 Jun 2022 18:00:51 GMT User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - sZHRO4JkAmw3HcI1PyxrC5twHvkHIWjyMLVIkauXKRA= + x-ms-date: + - Tue, 16 Aug 2022 09:59:50 GMT x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2022-06-01 response: body: - string: '{"token": "sanitized", "expiresOn": "2022-06-09T18:00:51.9039474+00:00"}' + string: '{"token": "sanitized", "expiresOn": "2022-08-17T09:59:52.5354481+00:00"}' headers: + accept-ranges: + - bytes api-supported-versions: - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, 2021-11-01, 2022-06-01 + connection: + - keep-alive content-length: - '72' content-type: - application/json; charset=utf-8 date: - - Wed, 08 Jun 2022 18:00:51 GMT + - Tue, 16 Aug 2022 09:59:52 GMT ms-cv: - - dusEax8NZ0mpZZ9E46pR+A.0 + - JEM0enPPl0y624oaGjgvkw.0 request-context: - appId= strict-transport-security: - max-age=2592000 x-azure-ref: - - 00+OgYgAAAAAcpqvANpg0SbG1xR0iRxwxWVZSMzExMDAwMTE2MDMxADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + - 20220816T095952Z-r0s9pbvvdt0w72q6sqrkc1ktpw00000005fg00000001uuq3 x-cache: - CONFIG_NOCACHE x-processing-time: - - 183ms + - 184ms status: code: 200 message: OK diff --git a/src/communication/azext_communication/tests/latest/recordings/test_issue_access_token_with_multiple_scopes.yaml b/src/communication/azext_communication/tests/latest/recordings/test_issue_access_token_with_multiple_scopes.yaml index 6a6489c4863..a75696fba75 100644 --- a/src/communication/azext_communication/tests/latest/recordings/test_issue_access_token_with_multiple_scopes.yaml +++ b/src/communication/azext_communication/tests/latest/recordings/test_issue_access_token_with_multiple_scopes.yaml @@ -1,54 +1,56 @@ -interactions: -- request: - body: '{"createTokenWithScopes": ["voip", "chat"]}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '43' - Content-Type: - - application/json - Date: - - Tue, 14 Jun 2022 20:12:00 GMT - User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.6.7 (Windows-10-10.0.22000-SP0) - x-ms-content-sha256: - - hlYiA5kT1yt3LwEdaupQDHzQEfodx+8svsStB5uolgw= - x-ms-return-client-request-id: - - 'true' - method: POST - uri: https://sanitized.communication.azure.com/identities?api-version=2021-03-07 - response: - body: - string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", - "expiresOn": "2022-06-15T20:12:00.1595868+00:00"}}' - headers: - api-supported-versions: - - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, - 2021-11-01, 2022-06-01 - content-length: - - '122' - content-type: - - application/json; charset=utf-8 - date: - - Tue, 14 Jun 2022 20:11:59 GMT - ms-cv: - - AJY7HIYAo0ugHKY2dt0zDw.0 - request-context: - - appId= - strict-transport-security: - - max-age=2592000 - x-azure-ref: - - 0kOuoYgAAAABGWOKFW6mDQJSUI52TlUl/U0pDRURHRTAzMTcAOWZjN2I1MTktYThjYy00Zjg5LTkzNWUtYzkxNDhhZTA5ZTgx - x-cache: - - CONFIG_NOCACHE - x-processing-time: - - 51ms - status: - code: 201 - message: Created -version: 1 +interactions: +- request: + body: '{"createTokenWithScopes": ["voip", "chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '43' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - hlYiA5kT1yt3LwEdaupQDHzQEfodx+8svsStB5uolgw= + x-ms-date: + - Tue, 16 Aug 2022 09:59:47 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", + "expiresOn": "2022-08-17T09:59:49.7131237+00:00"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + connection: + - keep-alive + content-length: + - '122' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 09:59:49 GMT + ms-cv: + - /GbH2hz02EWxkzskbH4bkw.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T095949Z-0613xdc17h3t90gs2g8fdg5r64000000009g00000002q1h3 + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 278ms + status: + code: 201 + message: Created +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_list_phonenumbers.yaml b/src/communication/azext_communication/tests/latest/recordings/test_list_phonenumbers.yaml index 5611221923d..caec95d4bbf 100644 --- a/src/communication/azext_communication/tests/latest/recordings/test_list_phonenumbers.yaml +++ b/src/communication/azext_communication/tests/latest/recordings/test_list_phonenumbers.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json Date: - - Wed, 08 Jun 2022 18:00:51 GMT + - Tue, 16 Aug 2022 10:02:59 GMT User-Agent: - - azsdk-python-communication-phonenumbers/1.0.1 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - ecyowPPqS6i2jEjg4ZPaHAki9yDR8IHa8lF+VXRefVM= x-ms-return-client-request-id: @@ -30,29 +30,29 @@ interactions: access-control-expose-headers: - Location,Operation-Location,operation-id,search-id api-supported-versions: - - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 content-length: - '0' date: - - Wed, 08 Jun 2022 18:00:54 GMT + - Tue, 16 Aug 2022 10:03:05 GMT location: - - /availablePhoneNumbers/searchResults/57ed2b65-3611-40b9-aa38-0df5f4291b2a?api-version=2021-03-07 + - /availablePhoneNumbers/searchResults/d071e23a-614e-40f1-b9bb-f1b8878e7fe7?api-version=2021-03-07 ms-cv: - - tNidcKnOGk6i8nmozvpySA.0 + - JNp1ANWAJkO2kPrqNKBU5g.0 operation-id: - - search_57ed2b65-3611-40b9-aa38-0df5f4291b2a + - search_d071e23a-614e-40f1-b9bb-f1b8878e7fe7 operation-location: - - /phoneNumbers/operations/search_57ed2b65-3611-40b9-aa38-0df5f4291b2a?api-version=2021-03-07 + - /phoneNumbers/operations/search_d071e23a-614e-40f1-b9bb-f1b8878e7fe7?api-version=2021-03-07 search-id: - - 57ed2b65-3611-40b9-aa38-0df5f4291b2a + - d071e23a-614e-40f1-b9bb-f1b8878e7fe7 strict-transport-security: - max-age=2592000 x-azure-ref: - - 00uOgYgAAAACESRSYtxqFTLkpacwwIWI8WVZSMzExMDAwMTE2MDM5ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + - 0VWv7YgAAAACeTZ5riaG7T4HHNGJvM23uWVZSMzExMDAwMTE2MDI1ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== x-cache: - CONFIG_NOCACHE x-processing-time: - - 3948ms + - 4004ms status: code: 202 message: Accepted @@ -66,44 +66,44 @@ interactions: Connection: - keep-alive Date: - - Wed, 08 Jun 2022 18:01:25 GMT + - Tue, 16 Aug 2022 10:03:34 GMT User-Agent: - - azsdk-python-communication-phonenumbers/1.0.1 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-return-client-request-id: - 'true' method: GET - uri: https://sanitized.communication.azure.com/phoneNumbers/operations/search_57ed2b65-3611-40b9-aa38-0df5f4291b2a?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/phoneNumbers/operations/search_d071e23a-614e-40f1-b9bb-f1b8878e7fe7?api-version=2021-03-07 response: body: string: '{"operationType": "search", "status": "succeeded", "resourceLocation": - "/availablePhoneNumbers/searchResults/57ed2b65-3611-40b9-aa38-0df5f4291b2a?api-version=2021-03-07", - "createdDateTime": "2022-06-08T18:00:54.6717955+00:00", "id": "sanitized", + "/availablePhoneNumbers/searchResults/d071e23a-614e-40f1-b9bb-f1b8878e7fe7?api-version=2021-03-07", + "createdDateTime": "2022-08-16T10:03:05.6267011+00:00", "id": "sanitized", "lastActionDateTime": "0001-01-01T00:00:00+00:00"}' headers: access-control-expose-headers: - Location api-supported-versions: - - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 content-type: - application/json; charset=utf-8 date: - - Wed, 08 Jun 2022 18:01:24 GMT + - Tue, 16 Aug 2022 10:03:35 GMT location: - - /availablePhoneNumbers/searchResults/57ed2b65-3611-40b9-aa38-0df5f4291b2a?api-version=2021-03-07 + - /availablePhoneNumbers/searchResults/d071e23a-614e-40f1-b9bb-f1b8878e7fe7?api-version=2021-03-07 ms-cv: - - 4rhhQFobjU+zNfd6nPVCnw.0 + - nJUR3FD4g0O1c1aAAFx01g.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-azure-ref: - - 09eOgYgAAAABx7MvFB/xvQJOu2thlMlzYWVZSMzExMDAwMTE2MDM5ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + - 0eGv7YgAAAAAeNccW+PimT77G0CVsSZ6XWVZSMzExMDAwMTE2MDI1ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== x-cache: - CONFIG_NOCACHE x-processing-time: - - 391ms + - 435ms status: code: 200 message: OK @@ -118,47 +118,47 @@ interactions: Connection: - keep-alive Date: - - Wed, 08 Jun 2022 18:01:26 GMT + - Tue, 16 Aug 2022 10:03:35 GMT User-Agent: - - azsdk-python-communication-phonenumbers/1.0.1 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-return-client-request-id: - 'true' method: GET - uri: https://sanitized.communication.azure.com/availablePhoneNumbers/searchResults/57ed2b65-3611-40b9-aa38-0df5f4291b2a?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/availablePhoneNumbers/searchResults/d071e23a-614e-40f1-b9bb-f1b8878e7fe7?api-version=2021-03-07 response: body: - string: '{"searchId": "57ed2b65-3611-40b9-aa38-0df5f4291b2a", "phoneNumbers": + string: '{"searchId": "d071e23a-614e-40f1-b9bb-f1b8878e7fe7", "phoneNumbers": ["sanitized"], "phoneNumberType": "tollFree", "assignmentType": "application", "capabilities": {"calling": "inbound", "sms": "inbound+outbound"}, "cost": {"amount": 2.0, "currencyCode": "USD", "billingFrequency": "monthly"}, "searchExpiresBy": - "2022-06-08T18:17:00.3072592+00:00"}' + "2022-08-16T10:19:07.3793843+00:00"}' headers: api-supported-versions: - - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 content-type: - application/json; charset=utf-8 date: - - Wed, 08 Jun 2022 18:01:26 GMT + - Tue, 16 Aug 2022 10:03:36 GMT ms-cv: - - /P7NTDCbcEe4V+EvxJ70wA.0 + - s1cp4Qgi3kCalkgpv6ahbA.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-azure-ref: - - 09eOgYgAAAACgNKZXbd/LSKRjj7kCjtS7WVZSMzExMDAwMTE2MDM5ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + - 0eGv7YgAAAADFGvBuRhH/ToV7Dm3muXbdWVZSMzExMDAwMTE2MDI1ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== x-cache: - CONFIG_NOCACHE x-processing-time: - - 1061ms + - 1098ms status: code: 200 message: OK url: sanitized - request: - body: '{"searchId": "57ed2b65-3611-40b9-aa38-0df5f4291b2a"}' + body: '{"searchId": "d071e23a-614e-40f1-b9bb-f1b8878e7fe7"}' headers: Accept: - application/json @@ -171,11 +171,11 @@ interactions: Content-Type: - application/json Date: - - Wed, 08 Jun 2022 18:01:27 GMT + - Tue, 16 Aug 2022 10:03:36 GMT User-Agent: - - azsdk-python-communication-phonenumbers/1.0.1 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - - 4ztvkrPnGXN1Lms0ny44NvlCOk0qMW2/GAFb7Vkvy+k= + - Vpmsi4K+24MsWNqaNmRpokcTvXGVH3wCRTgjYqGfmfQ= x-ms-return-client-request-id: - 'true' method: POST @@ -187,27 +187,27 @@ interactions: access-control-expose-headers: - Operation-Location,operation-id,purchase-id api-supported-versions: - - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 content-length: - '0' date: - - Wed, 08 Jun 2022 18:01:28 GMT + - Tue, 16 Aug 2022 10:03:39 GMT ms-cv: - - gHSQLQB3o0qiHLYLQoaB/Q.0 + - FSLBzs3uHk2Oacyh+ZymAQ.0 operation-id: - - purchase_57ed2b65-3611-40b9-aa38-0df5f4291b2a + - purchase_d071e23a-614e-40f1-b9bb-f1b8878e7fe7 operation-location: - - /phoneNumbers/operations/purchase_57ed2b65-3611-40b9-aa38-0df5f4291b2a?api-version=2021-03-07 + - /phoneNumbers/operations/purchase_d071e23a-614e-40f1-b9bb-f1b8878e7fe7?api-version=2021-03-07 purchase-id: - - 57ed2b65-3611-40b9-aa38-0df5f4291b2a + - d071e23a-614e-40f1-b9bb-f1b8878e7fe7 strict-transport-security: - max-age=2592000 x-azure-ref: - - 09uOgYgAAAABcg5WUapHtS5XQnLop0wq3WVZSMzExMDAwMTE2MDM5ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + - 0eWv7YgAAAAB6Gnc72A+fT4KHR4p9y4hSWVZSMzExMDAwMTE2MDI1ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== x-cache: - CONFIG_NOCACHE x-processing-time: - - 2399ms + - 1995ms status: code: 202 message: Accepted @@ -221,39 +221,39 @@ interactions: Connection: - keep-alive Date: - - Wed, 08 Jun 2022 18:01:59 GMT + - Tue, 16 Aug 2022 10:04:08 GMT User-Agent: - - azsdk-python-communication-phonenumbers/1.0.1 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-return-client-request-id: - 'true' method: GET - uri: https://sanitized.communication.azure.com/phoneNumbers/operations/purchase_57ed2b65-3611-40b9-aa38-0df5f4291b2a?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/phoneNumbers/operations/purchase_d071e23a-614e-40f1-b9bb-f1b8878e7fe7?api-version=2021-03-07 response: body: string: '{"operationType": "purchase", "status": "succeeded", "resourceLocation": - null, "createdDateTime": "2022-06-08T18:00:54.6717955+00:00", "id": "sanitized", + null, "createdDateTime": "2022-08-16T10:03:05.6267011+00:00", "id": "sanitized", "lastActionDateTime": "0001-01-01T00:00:00+00:00"}' headers: api-supported-versions: - - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 content-type: - application/json; charset=utf-8 date: - - Wed, 08 Jun 2022 18:02:02 GMT + - Tue, 16 Aug 2022 10:04:10 GMT ms-cv: - - 2MSgGRW+s0K8inmJxei0UQ.0 + - NIf8q8diCESbEklpyCBjvQ.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-azure-ref: - - 0F+SgYgAAAACt2WMAMGD7TJzFt5Xpb/jUWVZSMzExMDAwMTE2MDM5ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + - 0mWv7YgAAAACnJf/UOQdJT7jNc7OZjxX+WVZSMzExMDAwMTE2MDI1ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== x-cache: - CONFIG_NOCACHE x-processing-time: - - 3376ms + - 466ms status: code: 200 message: OK @@ -268,9 +268,9 @@ interactions: Connection: - keep-alive Date: - - Wed, 08 Jun 2022 18:02:03 GMT + - Tue, 16 Aug 2022 10:04:09 GMT User-Agent: - - azsdk-python-communication-phonenumbers/1.0.1 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-return-client-request-id: @@ -282,27 +282,29 @@ interactions: string: '{"phoneNumbers": [{"id": "sanitized", "phoneNumber": "sanitized", "countryCode": "US", "phoneNumberType": "tollFree", "capabilities": {"calling": "inbound", "sms": "inbound+outbound"}, "assignmentType": "application", "purchaseDate": - "2022-06-08T18:01:43.7922431+00:00", "cost": {"amount": 2.0, "currencyCode": + "2022-08-16T10:04:02.0257701+00:00", "cost": {"amount": 2.0, "currencyCode": "USD", "billingFrequency": "monthly"}}]}' headers: api-supported-versions: - - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive content-type: - application/json; charset=utf-8 date: - - Wed, 08 Jun 2022 18:02:05 GMT + - Tue, 16 Aug 2022 10:04:14 GMT ms-cv: - - yeu88UFdLEOXJ3RhBiPLPQ.0 + - Fj8/qnFgDEmcnEDe6TJ9og.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-azure-ref: - - 0G+SgYgAAAAAqDZN2dXA/SbZVXPJGmxDTWVZSMzExMDAwMTE2MDE3ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + - 20220816T100411Z-r0s9pbvvdt0w72q6sqrkc1ktpw00000005fg00000001wyzz x-cache: - CONFIG_NOCACHE x-processing-time: - - 2066ms + - 3188ms status: code: 200 message: OK diff --git a/src/communication/azext_communication/tests/latest/recordings/test_phonenumber_list.yaml b/src/communication/azext_communication/tests/latest/recordings/test_phonenumber_list.yaml new file mode 100644 index 00000000000..d87b8c3846e --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_phonenumber_list.yaml @@ -0,0 +1,312 @@ +interactions: +- request: + body: '{"phoneNumberType": "tollFree", "assignmentType": "application", "capabilities": + {"calling": "inbound", "sms": "inbound+outbound"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '131' + Content-Type: + - application/json + Date: + - Tue, 16 Aug 2022 10:02:59 GMT + User-Agent: + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - ecyowPPqS6i2jEjg4ZPaHAki9yDR8IHa8lF+VXRefVM= + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/availablePhoneNumbers/countries/US/:search?api-version=2021-03-07 + response: + body: + string: '' + headers: + access-control-expose-headers: + - Location,Operation-Location,operation-id,search-id + api-supported-versions: + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + content-length: + - '0' + date: + - Tue, 16 Aug 2022 10:03:06 GMT + location: + - /availablePhoneNumbers/searchResults/0d5d4cad-4386-42e5-8490-1ecebaaeeab4?api-version=2021-03-07 + ms-cv: + - RQ4f1aWn3UyPGdjnXXJcnQ.0 + operation-id: + - search_0d5d4cad-4386-42e5-8490-1ecebaaeeab4 + operation-location: + - /phoneNumbers/operations/search_0d5d4cad-4386-42e5-8490-1ecebaaeeab4?api-version=2021-03-07 + search-id: + - 0d5d4cad-4386-42e5-8490-1ecebaaeeab4 + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 0VWv7YgAAAADoCbObVWMYRY9nEAPN7lRBWVZSMzExMDAwMTE1MDM3ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 4672ms + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Date: + - Tue, 16 Aug 2022 10:03:35 GMT + User-Agent: + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= + x-ms-return-client-request-id: + - 'true' + method: GET + uri: https://sanitized.communication.azure.com/phoneNumbers/operations/search_0d5d4cad-4386-42e5-8490-1ecebaaeeab4?api-version=2021-03-07 + response: + body: + string: '{"operationType": "search", "status": "succeeded", "resourceLocation": + "/availablePhoneNumbers/searchResults/0d5d4cad-4386-42e5-8490-1ecebaaeeab4?api-version=2021-03-07", + "createdDateTime": "2022-08-16T10:03:06.255795+00:00", "id": "sanitized", + "lastActionDateTime": "0001-01-01T00:00:00+00:00"}' + headers: + access-control-expose-headers: + - Location + api-supported-versions: + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 10:03:37 GMT + location: + - /availablePhoneNumbers/searchResults/0d5d4cad-4386-42e5-8490-1ecebaaeeab4?api-version=2021-03-07 + ms-cv: + - Iyer8+C8xEmgzHF+c2TdsA.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 0eGv7YgAAAAD9OELzbL6FQrSFeezqnOw2WVZSMzExMDAwMTE1MDM3ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 480ms + status: + code: 200 + message: OK + url: sanitized +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Date: + - Tue, 16 Aug 2022 10:03:35 GMT + User-Agent: + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= + x-ms-return-client-request-id: + - 'true' + method: GET + uri: https://sanitized.communication.azure.com/availablePhoneNumbers/searchResults/0d5d4cad-4386-42e5-8490-1ecebaaeeab4?api-version=2021-03-07 + response: + body: + string: '{"searchId": "0d5d4cad-4386-42e5-8490-1ecebaaeeab4", "phoneNumbers": + ["sanitized"], "phoneNumberType": "tollFree", "assignmentType": "application", + "capabilities": {"calling": "inbound", "sms": "inbound+outbound"}, "cost": + {"amount": 2.0, "currencyCode": "USD", "billingFrequency": "monthly"}, "searchExpiresBy": + "2022-08-16T10:19:08.6849195+00:00"}' + headers: + api-supported-versions: + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 10:03:38 GMT + ms-cv: + - /c3H3J2QxU2nZZPDYod3zw.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 0eWv7YgAAAAAUdzqn/AwiSaiuo1XSwULKWVZSMzExMDAwMTE1MDM3ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 1184ms + status: + code: 200 + message: OK + url: sanitized +- request: + body: '{"searchId": "0d5d4cad-4386-42e5-8490-1ecebaaeeab4"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '52' + Content-Type: + - application/json + Date: + - Tue, 16 Aug 2022 10:03:37 GMT + User-Agent: + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - TmqDDYLXl38UpeqVJfkdBx2bma+yyPj3yfp0TcmDkMQ= + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/availablePhoneNumbers/:purchase?api-version=2021-03-07 + response: + body: + string: '' + headers: + access-control-expose-headers: + - Operation-Location,operation-id,purchase-id + api-supported-versions: + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + content-length: + - '0' + date: + - Tue, 16 Aug 2022 10:03:40 GMT + ms-cv: + - blKi99R4jEij2H/0IUqvCQ.0 + operation-id: + - purchase_0d5d4cad-4386-42e5-8490-1ecebaaeeab4 + operation-location: + - /phoneNumbers/operations/purchase_0d5d4cad-4386-42e5-8490-1ecebaaeeab4?api-version=2021-03-07 + purchase-id: + - 0d5d4cad-4386-42e5-8490-1ecebaaeeab4 + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 0emv7YgAAAADKq5ZE09e7RLFyMmXyxmq3WVZSMzExMDAwMTE1MDM3ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 2096ms + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Date: + - Tue, 16 Aug 2022 10:04:09 GMT + User-Agent: + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= + x-ms-return-client-request-id: + - 'true' + method: GET + uri: https://sanitized.communication.azure.com/phoneNumbers/operations/purchase_0d5d4cad-4386-42e5-8490-1ecebaaeeab4?api-version=2021-03-07 + response: + body: + string: '{"operationType": "purchase", "status": "succeeded", "resourceLocation": + null, "createdDateTime": "2022-08-16T10:03:06.255795+00:00", "id": "sanitized", + "lastActionDateTime": "0001-01-01T00:00:00+00:00"}' + headers: + api-supported-versions: + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 10:04:11 GMT + ms-cv: + - OJ+EicyA5UK9p2iqafAEsw.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 0mmv7YgAAAAC3A1t9JOmZSqKaQdT9LL4BWVZSMzExMDAwMTE1MDM3ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 612ms + status: + code: 200 + message: OK + url: sanitized +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Date: + - Tue, 16 Aug 2022 10:04:10 GMT + User-Agent: + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= + x-ms-return-client-request-id: + - 'true' + method: GET + uri: https://sanitized.communication.azure.com/phoneNumbers?skip=0&top=100&api-version=2021-03-07 + response: + body: + string: '{"phoneNumbers": [{"id": "sanitized", "phoneNumber": "sanitized", "countryCode": + "US", "phoneNumberType": "tollFree", "capabilities": {"calling": "inbound", + "sms": "inbound+outbound"}, "assignmentType": "application", "purchaseDate": + "2022-08-16T10:03:56.1608173+00:00", "cost": {"amount": 2.0, "currencyCode": + "USD", "billingFrequency": "monthly"}}]}' + headers: + api-supported-versions: + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 10:04:15 GMT + ms-cv: + - a6tSvLcitUWbmN+q7PdSSA.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T100411Z-r0s9pbvvdt0w72q6sqrkc1ktpw00000005fg00000001wz7f + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 3441ms + status: + code: 200 + message: OK + url: sanitized +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_phonenumber_show.yaml b/src/communication/azext_communication/tests/latest/recordings/test_phonenumber_show.yaml new file mode 100644 index 00000000000..ae8da5eafd9 --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_phonenumber_show.yaml @@ -0,0 +1,311 @@ +interactions: +- request: + body: '{"phoneNumberType": "tollFree", "assignmentType": "application", "capabilities": + {"calling": "inbound", "sms": "inbound+outbound"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '131' + Content-Type: + - application/json + Date: + - Tue, 16 Aug 2022 10:03:00 GMT + User-Agent: + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - ecyowPPqS6i2jEjg4ZPaHAki9yDR8IHa8lF+VXRefVM= + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/availablePhoneNumbers/countries/US/:search?api-version=2021-03-07 + response: + body: + string: '' + headers: + access-control-expose-headers: + - Location,Operation-Location,operation-id,search-id + api-supported-versions: + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + content-length: + - '0' + date: + - Tue, 16 Aug 2022 10:03:06 GMT + location: + - /availablePhoneNumbers/searchResults/daee3c02-ff9c-4471-affd-6ecefbc5634d?api-version=2021-03-07 + ms-cv: + - lF6OjIXTiUygJzR29Ygt+A.0 + operation-id: + - search_daee3c02-ff9c-4471-affd-6ecefbc5634d + operation-location: + - /phoneNumbers/operations/search_daee3c02-ff9c-4471-affd-6ecefbc5634d?api-version=2021-03-07 + search-id: + - daee3c02-ff9c-4471-affd-6ecefbc5634d + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 0VWv7YgAAAABQuvExpPAqSrvAB196hovGWVZSMzExMDAwMTE2MDQ3ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 4808ms + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Date: + - Tue, 16 Aug 2022 10:03:35 GMT + User-Agent: + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= + x-ms-return-client-request-id: + - 'true' + method: GET + uri: https://sanitized.communication.azure.com/phoneNumbers/operations/search_daee3c02-ff9c-4471-affd-6ecefbc5634d?api-version=2021-03-07 + response: + body: + string: '{"operationType": "search", "status": "succeeded", "resourceLocation": + "/availablePhoneNumbers/searchResults/daee3c02-ff9c-4471-affd-6ecefbc5634d?api-version=2021-03-07", + "createdDateTime": "2022-08-16T10:03:06.6005275+00:00", "id": "sanitized", + "lastActionDateTime": "0001-01-01T00:00:00+00:00"}' + headers: + access-control-expose-headers: + - Location + api-supported-versions: + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 10:03:36 GMT + location: + - /availablePhoneNumbers/searchResults/daee3c02-ff9c-4471-affd-6ecefbc5634d?api-version=2021-03-07 + ms-cv: + - PPPCxoNAKE6KXxsAco2uaA.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 0eWv7YgAAAACqN/8beqHCTYIol2ZXz0mmWVZSMzExMDAwMTE2MDQ3ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 346ms + status: + code: 200 + message: OK + url: sanitized +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Date: + - Tue, 16 Aug 2022 10:03:36 GMT + User-Agent: + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= + x-ms-return-client-request-id: + - 'true' + method: GET + uri: https://sanitized.communication.azure.com/availablePhoneNumbers/searchResults/daee3c02-ff9c-4471-affd-6ecefbc5634d?api-version=2021-03-07 + response: + body: + string: '{"searchId": "daee3c02-ff9c-4471-affd-6ecefbc5634d", "phoneNumbers": + ["sanitized"], "phoneNumberType": "tollFree", "assignmentType": "application", + "capabilities": {"calling": "inbound", "sms": "inbound+outbound"}, "cost": + {"amount": 2.0, "currencyCode": "USD", "billingFrequency": "monthly"}, "searchExpiresBy": + "2022-08-16T10:19:09.1577578+00:00"}' + headers: + api-supported-versions: + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 10:03:38 GMT + ms-cv: + - V77idBuuoku0FgcpaoVeKQ.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 0eWv7YgAAAADcwu0O0O2zQI96in+68Eu6WVZSMzExMDAwMTE2MDQ3ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 1220ms + status: + code: 200 + message: OK + url: sanitized +- request: + body: '{"searchId": "daee3c02-ff9c-4471-affd-6ecefbc5634d"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '52' + Content-Type: + - application/json + Date: + - Tue, 16 Aug 2022 10:03:37 GMT + User-Agent: + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - mW6DOLK8/P/1iH7cJUnUzXnPlqeR/3yLhvspY1J+hk4= + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/availablePhoneNumbers/:purchase?api-version=2021-03-07 + response: + body: + string: '' + headers: + access-control-expose-headers: + - Operation-Location,operation-id,purchase-id + api-supported-versions: + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + content-length: + - '0' + date: + - Tue, 16 Aug 2022 10:03:40 GMT + ms-cv: + - ySa4BpVCCk+gwvbFpf9mhg.0 + operation-id: + - purchase_daee3c02-ff9c-4471-affd-6ecefbc5634d + operation-location: + - /phoneNumbers/operations/purchase_daee3c02-ff9c-4471-affd-6ecefbc5634d?api-version=2021-03-07 + purchase-id: + - daee3c02-ff9c-4471-affd-6ecefbc5634d + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 0emv7YgAAAAAVb4dfViWbRrewhF8uOaj3WVZSMzExMDAwMTE2MDQ3ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 1949ms + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Date: + - Tue, 16 Aug 2022 10:04:09 GMT + User-Agent: + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= + x-ms-return-client-request-id: + - 'true' + method: GET + uri: https://sanitized.communication.azure.com/phoneNumbers/operations/purchase_daee3c02-ff9c-4471-affd-6ecefbc5634d?api-version=2021-03-07 + response: + body: + string: '{"operationType": "purchase", "status": "succeeded", "resourceLocation": + null, "createdDateTime": "2022-08-16T10:03:06.6005275+00:00", "id": "sanitized", + "lastActionDateTime": "0001-01-01T00:00:00+00:00"}' + headers: + api-supported-versions: + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 10:04:11 GMT + ms-cv: + - iOOhq3V0m0ammIf6EC7YQw.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 0mmv7YgAAAACWnyi3KhGEQrorrKP/fRTiWVZSMzExMDAwMTE2MDQ3ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 379ms + status: + code: 200 + message: OK + url: sanitized +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Date: + - Tue, 16 Aug 2022 10:04:09 GMT + User-Agent: + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= + x-ms-return-client-request-id: + - 'true' + method: GET + uri: https://sanitized.communication.azure.com/phoneNumbers/sanitized?api-version=2021-03-07 + response: + body: + string: '{"id": "sanitized", "phoneNumber": "sanitized", "countryCode": "US", + "phoneNumberType": "tollFree", "capabilities": {"calling": "inbound", "sms": + "inbound+outbound"}, "assignmentType": "application", "purchaseDate": "2022-08-16T10:03:56.35774+00:00", + "cost": {"amount": 2.0, "currencyCode": "USD", "billingFrequency": "monthly"}}' + headers: + api-supported-versions: + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 10:04:14 GMT + ms-cv: + - Tu+JS/GbtEmrscFDHxK2dg.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T100411Z-z5w8hfkph50p97tr7b7ay90rp000000000bg00000001ye36 + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 2391ms + status: + code: 200 + message: OK + url: sanitized +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_revoke_access_tokens.yaml b/src/communication/azext_communication/tests/latest/recordings/test_revoke_access_tokens.yaml new file mode 100644 index 00000000000..a9d24cb3879 --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_revoke_access_tokens.yaml @@ -0,0 +1,102 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - RBNvo1WzZ4oRRq0W9+hknpT7T8If536DEMBg9hyq/4o= + x-ms-date: + - Tue, 16 Aug 2022 10:01:23 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + connection: + - keep-alive + content-length: + - '33' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 10:01:25 GMT + ms-cv: + - P3DICJT/b061SkQGdZt8AQ.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T100125Z-zvdmwacghh4c97ggppewnyshxn00000000e000000003rud9 + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 120ms + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= + x-ms-date: + - Tue, 16 Aug 2022 10:01:24 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities/sanitized/:revokeAccessTokens?api-version=2022-06-01 + response: + body: + string: '' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + connection: + - keep-alive + date: + - Tue, 16 Aug 2022 10:01:26 GMT + ms-cv: + - aZ0HuPq9skuoVOAKj+UBPA.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T100125Z-vucxhh51rx5mv27fvss3h7q1kc00000000f000000000503s + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 113ms + status: + code: 204 + message: No Content +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_send_sms.yaml b/src/communication/azext_communication/tests/latest/recordings/test_send_sms.yaml index c18496a0724..67208e49259 100644 --- a/src/communication/azext_communication/tests/latest/recordings/test_send_sms.yaml +++ b/src/communication/azext_communication/tests/latest/recordings/test_send_sms.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json Date: - - Wed, 08 Jun 2022 18:02:28 GMT + - Tue, 16 Aug 2022 10:05:47 GMT User-Agent: - - azsdk-python-communication-phonenumbers/1.0.1 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - ecyowPPqS6i2jEjg4ZPaHAki9yDR8IHa8lF+VXRefVM= x-ms-return-client-request-id: @@ -30,29 +30,31 @@ interactions: access-control-expose-headers: - Location,Operation-Location,operation-id,search-id api-supported-versions: - - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive content-length: - '0' date: - - Wed, 08 Jun 2022 18:02:30 GMT + - Tue, 16 Aug 2022 10:05:53 GMT location: - - /availablePhoneNumbers/searchResults/2d19903b-7822-4be9-86f8-377c31f6ebd8?api-version=2021-03-07 + - /availablePhoneNumbers/searchResults/a3738768-bd5c-41de-9c18-fec26fc75b92?api-version=2021-03-07 ms-cv: - - wc/MCoMN1keywSc8+QuPsg.0 + - BFLENTcfAEGV1Ku7W1uBhg.0 operation-id: - - search_2d19903b-7822-4be9-86f8-377c31f6ebd8 + - search_a3738768-bd5c-41de-9c18-fec26fc75b92 operation-location: - - /phoneNumbers/operations/search_2d19903b-7822-4be9-86f8-377c31f6ebd8?api-version=2021-03-07 + - /phoneNumbers/operations/search_a3738768-bd5c-41de-9c18-fec26fc75b92?api-version=2021-03-07 search-id: - - 2d19903b-7822-4be9-86f8-377c31f6ebd8 + - a3738768-bd5c-41de-9c18-fec26fc75b92 strict-transport-security: - max-age=2592000 x-azure-ref: - - 0NOSgYgAAAAC68Dpsh9UXQpx3Q4xyPfU5WVZSMzExMDAwMTE1MDUzADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + - 20220816T100549Z-0613xdc17h3t90gs2g8fdg5r64000000009g00000002str8 x-cache: - CONFIG_NOCACHE x-processing-time: - - 3153ms + - 3435ms status: code: 202 message: Accepted @@ -66,44 +68,46 @@ interactions: Connection: - keep-alive Date: - - Wed, 08 Jun 2022 18:03:01 GMT + - Tue, 16 Aug 2022 10:06:21 GMT User-Agent: - - azsdk-python-communication-phonenumbers/1.0.1 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-return-client-request-id: - 'true' method: GET - uri: https://sanitized.communication.azure.com/phoneNumbers/operations/search_2d19903b-7822-4be9-86f8-377c31f6ebd8?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/phoneNumbers/operations/search_a3738768-bd5c-41de-9c18-fec26fc75b92?api-version=2021-03-07 response: body: string: '{"operationType": "search", "status": "succeeded", "resourceLocation": - "/availablePhoneNumbers/searchResults/2d19903b-7822-4be9-86f8-377c31f6ebd8?api-version=2021-03-07", - "createdDateTime": "2022-06-08T18:02:30.9157918+00:00", "id": "search_2d19903b-7822-4be9-86f8-377c31f6ebd8", + "/availablePhoneNumbers/searchResults/a3738768-bd5c-41de-9c18-fec26fc75b92?api-version=2021-03-07", + "createdDateTime": "2022-08-16T10:05:52.5549922+00:00", "id": "search_a3738768-bd5c-41de-9c18-fec26fc75b92", "lastActionDateTime": "0001-01-01T00:00:00+00:00"}' headers: access-control-expose-headers: - Location api-supported-versions: - - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive content-type: - application/json; charset=utf-8 date: - - Wed, 08 Jun 2022 18:03:01 GMT + - Tue, 16 Aug 2022 10:06:23 GMT location: - - /availablePhoneNumbers/searchResults/2d19903b-7822-4be9-86f8-377c31f6ebd8?api-version=2021-03-07 + - /availablePhoneNumbers/searchResults/a3738768-bd5c-41de-9c18-fec26fc75b92?api-version=2021-03-07 ms-cv: - - BkOg+uQH/0+c8J3mWA1Ntw.0 + - Sm1eAb4sskOwoEIHpVnlZA.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-azure-ref: - - 0VeSgYgAAAACdaRoazdmkRIwEjtG5OEeUWVZSMzExMDAwMTE1MDUzADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + - 20220816T100623Z-0613xdc17h3t90gs2g8fdg5r64000000009g00000002t23z x-cache: - CONFIG_NOCACHE x-processing-time: - - 440ms + - 446ms status: code: 200 message: OK @@ -118,47 +122,49 @@ interactions: Connection: - keep-alive Date: - - Wed, 08 Jun 2022 18:03:02 GMT + - Tue, 16 Aug 2022 10:06:22 GMT User-Agent: - - azsdk-python-communication-phonenumbers/1.0.1 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-return-client-request-id: - 'true' method: GET - uri: https://sanitized.communication.azure.com/availablePhoneNumbers/searchResults/2d19903b-7822-4be9-86f8-377c31f6ebd8?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/availablePhoneNumbers/searchResults/a3738768-bd5c-41de-9c18-fec26fc75b92?api-version=2021-03-07 response: body: - string: '{"searchId": "2d19903b-7822-4be9-86f8-377c31f6ebd8", "phoneNumbers": - ["+18772136127"], "phoneNumberType": "tollFree", "assignmentType": "application", + string: '{"searchId": "a3738768-bd5c-41de-9c18-fec26fc75b92", "phoneNumbers": + ["+18447309009"], "phoneNumberType": "tollFree", "assignmentType": "application", "capabilities": {"calling": "inbound", "sms": "inbound+outbound"}, "cost": {"amount": 2.0, "currencyCode": "USD", "billingFrequency": "monthly"}, "searchExpiresBy": - "2022-06-08T18:18:34.2527577+00:00"}' + "2022-08-16T10:21:55.2829994+00:00"}' headers: api-supported-versions: - - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive content-type: - application/json; charset=utf-8 date: - - Wed, 08 Jun 2022 18:03:02 GMT + - Tue, 16 Aug 2022 10:06:25 GMT ms-cv: - - KftmnlmZCEuRQXGSAKSWew.0 + - GXuhNsnBNUChiTGpfWIebQ.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-azure-ref: - - 0VuSgYgAAAACzQX6HdkuVQo9jpwDikjNSWVZSMzExMDAwMTE1MDUzADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + - 20220816T100623Z-0613xdc17h3t90gs2g8fdg5r64000000009g00000002t292 x-cache: - CONFIG_NOCACHE x-processing-time: - - 1351ms + - 1286ms status: code: 200 message: OK url: sanitized - request: - body: '{"searchId": "2d19903b-7822-4be9-86f8-377c31f6ebd8"}' + body: '{"searchId": "a3738768-bd5c-41de-9c18-fec26fc75b92"}' headers: Accept: - application/json @@ -171,11 +177,11 @@ interactions: Content-Type: - application/json Date: - - Wed, 08 Jun 2022 18:03:03 GMT + - Tue, 16 Aug 2022 10:06:23 GMT User-Agent: - - azsdk-python-communication-phonenumbers/1.0.1 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - - 6KqXgRvvk0OY7unyaDWoIwxdZiw3zPrEZA+ZxnoQtiE= + - Oja5Kw+Qiu3UOFL24A+1fLSVzdqQ+oCJoNZPX/cna4I= x-ms-return-client-request-id: - 'true' method: POST @@ -187,27 +193,29 @@ interactions: access-control-expose-headers: - Operation-Location,operation-id,purchase-id api-supported-versions: - - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive content-length: - '0' date: - - Wed, 08 Jun 2022 18:03:05 GMT + - Tue, 16 Aug 2022 10:06:27 GMT ms-cv: - - cFfdSeiOBkCKoxwWgQ7Tvg.0 + - pq9d58+OQ0Ct9pNaK28XFw.0 operation-id: - - purchase_2d19903b-7822-4be9-86f8-377c31f6ebd8 + - purchase_a3738768-bd5c-41de-9c18-fec26fc75b92 operation-location: - - /phoneNumbers/operations/purchase_2d19903b-7822-4be9-86f8-377c31f6ebd8?api-version=2021-03-07 + - /phoneNumbers/operations/purchase_a3738768-bd5c-41de-9c18-fec26fc75b92?api-version=2021-03-07 purchase-id: - - 2d19903b-7822-4be9-86f8-377c31f6ebd8 + - a3738768-bd5c-41de-9c18-fec26fc75b92 strict-transport-security: - max-age=2592000 x-azure-ref: - - 0V+SgYgAAAAC7WoZTMar7SbFI/I34BaOPWVZSMzExMDAwMTE1MDUzADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + - 20220816T100625Z-0613xdc17h3t90gs2g8fdg5r64000000009g00000002t2rc x-cache: - CONFIG_NOCACHE x-processing-time: - - 2356ms + - 2126ms status: code: 202 message: Accepted @@ -221,39 +229,41 @@ interactions: Connection: - keep-alive Date: - - Wed, 08 Jun 2022 18:03:36 GMT + - Tue, 16 Aug 2022 10:06:55 GMT User-Agent: - - azsdk-python-communication-phonenumbers/1.0.1 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-return-client-request-id: - 'true' method: GET - uri: https://sanitized.communication.azure.com/phoneNumbers/operations/purchase_2d19903b-7822-4be9-86f8-377c31f6ebd8?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/phoneNumbers/operations/purchase_a3738768-bd5c-41de-9c18-fec26fc75b92?api-version=2021-03-07 response: body: string: '{"operationType": "purchase", "status": "succeeded", "resourceLocation": - null, "createdDateTime": "2022-06-08T18:02:30.9157918+00:00", "id": "purchase_2d19903b-7822-4be9-86f8-377c31f6ebd8", + null, "createdDateTime": "2022-08-16T10:05:52.5549922+00:00", "id": "purchase_a3738768-bd5c-41de-9c18-fec26fc75b92", "lastActionDateTime": "0001-01-01T00:00:00+00:00"}' headers: api-supported-versions: - - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive content-type: - application/json; charset=utf-8 date: - - Wed, 08 Jun 2022 18:03:35 GMT + - Tue, 16 Aug 2022 10:06:58 GMT ms-cv: - - yK2hANyhFEWAxcVDTeQ+gw.0 + - 0ZuusCTkgE+8GFIzuF8cXg.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-azure-ref: - - 0d+SgYgAAAACkf6llJn4PRJ7zBU8vQCrqWVZSMzExMDAwMTE1MDUzADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + - 20220816T100657Z-0613xdc17h3t90gs2g8fdg5r64000000009g00000002tbky x-cache: - CONFIG_NOCACHE x-processing-time: - - 605ms + - 554ms status: code: 200 message: OK @@ -274,11 +284,11 @@ interactions: Content-Type: - application/json Date: - - Wed, 08 Jun 2022 18:03:37 GMT + - Tue, 16 Aug 2022 10:06:56 GMT User-Agent: - - azsdk-python-communication-sms/1.0.1 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - azsdk-python-communication-sms/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - - MHxiUlyEp5c1qcJx+CiIZ0pGD9nPTrRNrJLpmTrI9fE= + - 5g9xjbm/XI5H5On9vB0GiIpy+mQye2e6PmGJQ2PyTsg= x-ms-return-client-request-id: - 'true' method: POST @@ -290,22 +300,24 @@ interactions: headers: api-supported-versions: - 2020-07-20-preview1, 2020-08-20-preview, 2021-03-07 + connection: + - keep-alive content-type: - application/json; charset=utf-8 date: - - Wed, 08 Jun 2022 18:03:37 GMT + - Tue, 16 Aug 2022 10:06:59 GMT ms-cv: - - caOZFxgqzEq0S5SXOsANOQ.0 + - yAyevJDWQEGQPKB0xmGuTA.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-azure-ref: - - 0eOSgYgAAAADLZumqCoXoRL4bqT/E1BTrWVZSMzExMDAwMTE1MDI1ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + - 20220816T100658Z-z5w8hfkph50p97tr7b7ay90rp000000000dg000000000ybq x-cache: - CONFIG_NOCACHE x-processing-time: - - 147ms + - 335ms status: code: 202 message: Accepted diff --git a/src/communication/azext_communication/tests/latest/recordings/test_send_sms_n_recipients.yaml b/src/communication/azext_communication/tests/latest/recordings/test_send_sms_n_recipients.yaml index ceba458eb35..0767d346a66 100644 --- a/src/communication/azext_communication/tests/latest/recordings/test_send_sms_n_recipients.yaml +++ b/src/communication/azext_communication/tests/latest/recordings/test_send_sms_n_recipients.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json Date: - - Fri, 10 Jun 2022 00:30:17 GMT + - Tue, 16 Aug 2022 10:05:47 GMT User-Agent: - - azsdk-python-communication-phonenumbers/1.0.1 Python/3.6.7 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - ecyowPPqS6i2jEjg4ZPaHAki9yDR8IHa8lF+VXRefVM= x-ms-return-client-request-id: @@ -30,31 +30,31 @@ interactions: access-control-expose-headers: - Location,Operation-Location,operation-id,search-id api-supported-versions: - - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 connection: - keep-alive content-length: - '0' date: - - Fri, 10 Jun 2022 00:30:22 GMT + - Tue, 16 Aug 2022 10:05:53 GMT location: - - /availablePhoneNumbers/searchResults/2a77a8fc-7ce6-4772-a73f-032383693ea4?api-version=2021-03-07 + - /availablePhoneNumbers/searchResults/8bdd95e9-9cb1-487f-8fad-d1a27167b1ad?api-version=2021-03-07 ms-cv: - - +fn8wM5+S0q51QDBzbKCog.0 + - 7ZgWHNHzKUK5XZWFKmt7Gg.0 operation-id: - - search_2a77a8fc-7ce6-4772-a73f-032383693ea4 + - search_8bdd95e9-9cb1-487f-8fad-d1a27167b1ad operation-location: - - /phoneNumbers/operations/search_2a77a8fc-7ce6-4772-a73f-032383693ea4?api-version=2021-03-07 + - /phoneNumbers/operations/search_8bdd95e9-9cb1-487f-8fad-d1a27167b1ad?api-version=2021-03-07 search-id: - - 2a77a8fc-7ce6-4772-a73f-032383693ea4 + - 8bdd95e9-9cb1-487f-8fad-d1a27167b1ad strict-transport-security: - max-age=2592000 x-azure-ref: - - 20220610T003017Z-vkhs01dsad2yh0kuygqupe3vh400000000yg00000003quhm + - 20220816T100549Z-0613xdc17h3t90gs2g8fdg5r64000000009g00000002e6q9 x-cache: - CONFIG_NOCACHE x-processing-time: - - 4685ms + - 3969ms status: code: 202 message: Accepted @@ -68,46 +68,46 @@ interactions: Connection: - keep-alive Date: - - Fri, 10 Jun 2022 00:30:52 GMT + - Tue, 16 Aug 2022 10:06:22 GMT User-Agent: - - azsdk-python-communication-phonenumbers/1.0.1 Python/3.6.7 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-return-client-request-id: - 'true' method: GET - uri: https://sanitized.communication.azure.com/phoneNumbers/operations/search_2a77a8fc-7ce6-4772-a73f-032383693ea4?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/phoneNumbers/operations/search_8bdd95e9-9cb1-487f-8fad-d1a27167b1ad?api-version=2021-03-07 response: body: string: '{"operationType": "search", "status": "succeeded", "resourceLocation": - "/availablePhoneNumbers/searchResults/2a77a8fc-7ce6-4772-a73f-032383693ea4?api-version=2021-03-07", - "createdDateTime": "2022-06-10T00:30:21.7878417+00:00", "id": "search_2a77a8fc-7ce6-4772-a73f-032383693ea4", + "/availablePhoneNumbers/searchResults/8bdd95e9-9cb1-487f-8fad-d1a27167b1ad?api-version=2021-03-07", + "createdDateTime": "2022-08-16T10:05:53.3222001+00:00", "id": "search_8bdd95e9-9cb1-487f-8fad-d1a27167b1ad", "lastActionDateTime": "0001-01-01T00:00:00+00:00"}' headers: access-control-expose-headers: - Location api-supported-versions: - - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 connection: - keep-alive content-type: - application/json; charset=utf-8 date: - - Fri, 10 Jun 2022 00:30:52 GMT + - Tue, 16 Aug 2022 10:06:24 GMT location: - - /availablePhoneNumbers/searchResults/2a77a8fc-7ce6-4772-a73f-032383693ea4?api-version=2021-03-07 + - /availablePhoneNumbers/searchResults/8bdd95e9-9cb1-487f-8fad-d1a27167b1ad?api-version=2021-03-07 ms-cv: - - DBDSfYSCMkSu6H6XS2h1YA.0 + - 6Bqt3T1uSky+tV2YIbYN2A.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-azure-ref: - - 20220610T003052Z-vkhs01dsad2yh0kuygqupe3vh400000000yg00000003r5ww + - 20220816T100623Z-0613xdc17h3t90gs2g8fdg5r64000000009g00000002ed9q x-cache: - CONFIG_NOCACHE x-processing-time: - - 354ms + - 363ms status: code: 200 message: OK @@ -122,49 +122,49 @@ interactions: Connection: - keep-alive Date: - - Fri, 10 Jun 2022 00:30:53 GMT + - Tue, 16 Aug 2022 10:06:22 GMT User-Agent: - - azsdk-python-communication-phonenumbers/1.0.1 Python/3.6.7 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-return-client-request-id: - 'true' method: GET - uri: https://sanitized.communication.azure.com/availablePhoneNumbers/searchResults/2a77a8fc-7ce6-4772-a73f-032383693ea4?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/availablePhoneNumbers/searchResults/8bdd95e9-9cb1-487f-8fad-d1a27167b1ad?api-version=2021-03-07 response: body: - string: '{"searchId": "2a77a8fc-7ce6-4772-a73f-032383693ea4", "phoneNumbers": - ["+18772141103"], "phoneNumberType": "tollFree", "assignmentType": "application", + string: '{"searchId": "8bdd95e9-9cb1-487f-8fad-d1a27167b1ad", "phoneNumbers": + ["+18335540445"], "phoneNumberType": "tollFree", "assignmentType": "application", "capabilities": {"calling": "inbound", "sms": "inbound+outbound"}, "cost": {"amount": 2.0, "currencyCode": "USD", "billingFrequency": "monthly"}, "searchExpiresBy": - "2022-06-10T00:46:24.0376156+00:00"}' + "2022-08-16T10:21:55.7611777+00:00"}' headers: api-supported-versions: - - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 connection: - keep-alive content-type: - application/json; charset=utf-8 date: - - Fri, 10 Jun 2022 00:30:53 GMT + - Tue, 16 Aug 2022 10:06:25 GMT ms-cv: - - MXztCMP7xkK/bAxKlAOoXw.0 + - Sovy3xV8gEmKLZWn6GQecg.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-azure-ref: - - 20220610T003052Z-vkhs01dsad2yh0kuygqupe3vh400000000yg00000003r60n + - 20220816T100624Z-0613xdc17h3t90gs2g8fdg5r64000000009g00000002edcx x-cache: - CONFIG_NOCACHE x-processing-time: - - 996ms + - 1370ms status: code: 200 message: OK url: sanitized - request: - body: '{"searchId": "2a77a8fc-7ce6-4772-a73f-032383693ea4"}' + body: '{"searchId": "8bdd95e9-9cb1-487f-8fad-d1a27167b1ad"}' headers: Accept: - application/json @@ -177,11 +177,11 @@ interactions: Content-Type: - application/json Date: - - Fri, 10 Jun 2022 00:30:54 GMT + - Tue, 16 Aug 2022 10:06:24 GMT User-Agent: - - azsdk-python-communication-phonenumbers/1.0.1 Python/3.6.7 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - - BV6FA4pfi1Zv445E+sTv+/uYtzt/J9dNJciBRr+jECw= + - MnsOukh6c+mgAbfYjvtf4LOigGqELu6v2aCc3AoLpKU= x-ms-return-client-request-id: - 'true' method: POST @@ -193,29 +193,29 @@ interactions: access-control-expose-headers: - Operation-Location,operation-id,purchase-id api-supported-versions: - - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 connection: - keep-alive content-length: - '0' date: - - Fri, 10 Jun 2022 00:30:56 GMT + - Tue, 16 Aug 2022 10:06:27 GMT ms-cv: - - tuLIr2lQ30eN1mBmaF5S9Q.0 + - pRD//etaekeTPwOzakvD0g.0 operation-id: - - purchase_2a77a8fc-7ce6-4772-a73f-032383693ea4 + - purchase_8bdd95e9-9cb1-487f-8fad-d1a27167b1ad operation-location: - - /phoneNumbers/operations/purchase_2a77a8fc-7ce6-4772-a73f-032383693ea4?api-version=2021-03-07 + - /phoneNumbers/operations/purchase_8bdd95e9-9cb1-487f-8fad-d1a27167b1ad?api-version=2021-03-07 purchase-id: - - 2a77a8fc-7ce6-4772-a73f-032383693ea4 + - 8bdd95e9-9cb1-487f-8fad-d1a27167b1ad strict-transport-security: - max-age=2592000 x-azure-ref: - - 20220610T003053Z-vkhs01dsad2yh0kuygqupe3vh400000000yg00000003r68w + - 20220816T100625Z-0613xdc17h3t90gs2g8fdg5r64000000009g00000002edqw x-cache: - CONFIG_NOCACHE x-processing-time: - - 2014ms + - 1899ms status: code: 202 message: Accepted @@ -229,41 +229,41 @@ interactions: Connection: - keep-alive Date: - - Fri, 10 Jun 2022 00:31:26 GMT + - Tue, 16 Aug 2022 10:06:56 GMT User-Agent: - - azsdk-python-communication-phonenumbers/1.0.1 Python/3.6.7 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-return-client-request-id: - 'true' method: GET - uri: https://sanitized.communication.azure.com/phoneNumbers/operations/purchase_2a77a8fc-7ce6-4772-a73f-032383693ea4?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/phoneNumbers/operations/purchase_8bdd95e9-9cb1-487f-8fad-d1a27167b1ad?api-version=2021-03-07 response: body: string: '{"operationType": "purchase", "status": "succeeded", "resourceLocation": - null, "createdDateTime": "2022-06-10T00:30:21.7878417+00:00", "id": "purchase_2a77a8fc-7ce6-4772-a73f-032383693ea4", + null, "createdDateTime": "2022-08-16T10:05:53.3222001+00:00", "id": "purchase_8bdd95e9-9cb1-487f-8fad-d1a27167b1ad", "lastActionDateTime": "0001-01-01T00:00:00+00:00"}' headers: api-supported-versions: - - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 connection: - keep-alive content-type: - application/json; charset=utf-8 date: - - Fri, 10 Jun 2022 00:31:26 GMT + - Tue, 16 Aug 2022 10:06:58 GMT ms-cv: - - VVi5q8hRtkWAs7yT+fXhQw.0 + - CDrG4AuGbUekb7sW9C6bmQ.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-azure-ref: - - 20220610T003126Z-vkhs01dsad2yh0kuygqupe3vh400000000yg00000003re3t + - 20220816T100657Z-0613xdc17h3t90gs2g8fdg5r64000000009g00000002epcg x-cache: - CONFIG_NOCACHE x-processing-time: - - 352ms + - 574ms status: code: 200 message: OK @@ -283,9 +283,9 @@ interactions: Content-Type: - application/json Date: - - Fri, 10 Jun 2022 00:31:26 GMT + - Tue, 16 Aug 2022 10:06:57 GMT User-Agent: - - azsdk-python-communication-phonenumbers/1.0.1 Python/3.6.7 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - ecyowPPqS6i2jEjg4ZPaHAki9yDR8IHa8lF+VXRefVM= x-ms-return-client-request-id: @@ -299,29 +299,31 @@ interactions: access-control-expose-headers: - Location,Operation-Location,operation-id,search-id api-supported-versions: - - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive content-length: - '0' date: - - Fri, 10 Jun 2022 00:31:30 GMT + - Tue, 16 Aug 2022 10:07:01 GMT location: - - /availablePhoneNumbers/searchResults/9ee520b5-b3e2-4d78-a93e-9ce72f84a2d8?api-version=2021-03-07 + - /availablePhoneNumbers/searchResults/8a682b75-077d-4e91-abed-1daf1878c8c2?api-version=2021-03-07 ms-cv: - - CTvU+d3B10OAyDyimusTQQ.0 + - ZeGVxFlc10C1LpHKGX4wzw.0 operation-id: - - search_9ee520b5-b3e2-4d78-a93e-9ce72f84a2d8 + - search_8a682b75-077d-4e91-abed-1daf1878c8c2 operation-location: - - /phoneNumbers/operations/search_9ee520b5-b3e2-4d78-a93e-9ce72f84a2d8?api-version=2021-03-07 + - /phoneNumbers/operations/search_8a682b75-077d-4e91-abed-1daf1878c8c2?api-version=2021-03-07 search-id: - - 9ee520b5-b3e2-4d78-a93e-9ce72f84a2d8 + - 8a682b75-077d-4e91-abed-1daf1878c8c2 strict-transport-security: - max-age=2592000 x-azure-ref: - - 03pCiYgAAAABym+z6OLdtRIXte0D3bHvjWVZSMzExMDAwMTE1MDQ5ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + - 20220816T100658Z-zvdmwacghh4c97ggppewnyshxn00000000eg00000003abaa x-cache: - CONFIG_NOCACHE x-processing-time: - - 3465ms + - 2347ms status: code: 202 message: Accepted @@ -335,44 +337,46 @@ interactions: Connection: - keep-alive Date: - - Fri, 10 Jun 2022 00:32:00 GMT + - Tue, 16 Aug 2022 10:07:29 GMT User-Agent: - - azsdk-python-communication-phonenumbers/1.0.1 Python/3.6.7 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-return-client-request-id: - 'true' method: GET - uri: https://sanitized.communication.azure.com/phoneNumbers/operations/search_9ee520b5-b3e2-4d78-a93e-9ce72f84a2d8?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/phoneNumbers/operations/search_8a682b75-077d-4e91-abed-1daf1878c8c2?api-version=2021-03-07 response: body: string: '{"operationType": "search", "status": "succeeded", "resourceLocation": - "/availablePhoneNumbers/searchResults/9ee520b5-b3e2-4d78-a93e-9ce72f84a2d8?api-version=2021-03-07", - "createdDateTime": "2022-06-10T00:31:29.987717+00:00", "id": "search_9ee520b5-b3e2-4d78-a93e-9ce72f84a2d8", + "/availablePhoneNumbers/searchResults/8a682b75-077d-4e91-abed-1daf1878c8c2?api-version=2021-03-07", + "createdDateTime": "2022-08-16T10:07:01.0017812+00:00", "id": "search_8a682b75-077d-4e91-abed-1daf1878c8c2", "lastActionDateTime": "0001-01-01T00:00:00+00:00"}' headers: access-control-expose-headers: - Location api-supported-versions: - - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive content-type: - application/json; charset=utf-8 date: - - Fri, 10 Jun 2022 00:32:00 GMT + - Tue, 16 Aug 2022 10:07:32 GMT location: - - /availablePhoneNumbers/searchResults/9ee520b5-b3e2-4d78-a93e-9ce72f84a2d8?api-version=2021-03-07 + - /availablePhoneNumbers/searchResults/8a682b75-077d-4e91-abed-1daf1878c8c2?api-version=2021-03-07 ms-cv: - - RnwSeXFQAk65AzAjyoCW0A.0 + - n18UgyYbhEuy/3PPtES13g.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-azure-ref: - - 0AJGiYgAAAADePP3btPsUQZRuiXVk38L0WVZSMzExMDAwMTE1MDQ5ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + - 20220816T100731Z-zvdmwacghh4c97ggppewnyshxn00000000eg00000003amgp x-cache: - CONFIG_NOCACHE x-processing-time: - - 419ms + - 412ms status: code: 200 message: OK @@ -387,47 +391,49 @@ interactions: Connection: - keep-alive Date: - - Fri, 10 Jun 2022 00:32:01 GMT + - Tue, 16 Aug 2022 10:07:30 GMT User-Agent: - - azsdk-python-communication-phonenumbers/1.0.1 Python/3.6.7 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-return-client-request-id: - 'true' method: GET - uri: https://sanitized.communication.azure.com/availablePhoneNumbers/searchResults/9ee520b5-b3e2-4d78-a93e-9ce72f84a2d8?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/availablePhoneNumbers/searchResults/8a682b75-077d-4e91-abed-1daf1878c8c2?api-version=2021-03-07 response: body: - string: '{"searchId": "9ee520b5-b3e2-4d78-a93e-9ce72f84a2d8", "phoneNumbers": - ["+18772140942"], "phoneNumberType": "tollFree", "assignmentType": "application", + string: '{"searchId": "8a682b75-077d-4e91-abed-1daf1878c8c2", "phoneNumbers": + ["+18662073070"], "phoneNumberType": "tollFree", "assignmentType": "application", "capabilities": {"calling": "inbound", "sms": "inbound+outbound"}, "cost": {"amount": 2.0, "currencyCode": "USD", "billingFrequency": "monthly"}, "searchExpiresBy": - "2022-06-10T00:47:31.6891869+00:00"}' + "2022-08-16T10:23:03.4112820+00:00"}' headers: api-supported-versions: - - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive content-type: - application/json; charset=utf-8 date: - - Fri, 10 Jun 2022 00:32:01 GMT + - Tue, 16 Aug 2022 10:07:33 GMT ms-cv: - - mJ+J5laoIEaklSxJkTT0dA.0 + - mGCnOs7D9kqV6W2USP/0jQ.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-azure-ref: - - 0AJGiYgAAAAAemXn6XSbjSI3mk2hCOnoiWVZSMzExMDAwMTE1MDQ5ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + - 20220816T100732Z-zvdmwacghh4c97ggppewnyshxn00000000eg00000003amqa x-cache: - CONFIG_NOCACHE x-processing-time: - - 1318ms + - 1260ms status: code: 200 message: OK url: sanitized - request: - body: '{"searchId": "9ee520b5-b3e2-4d78-a93e-9ce72f84a2d8"}' + body: '{"searchId": "8a682b75-077d-4e91-abed-1daf1878c8c2"}' headers: Accept: - application/json @@ -440,11 +446,11 @@ interactions: Content-Type: - application/json Date: - - Fri, 10 Jun 2022 00:32:02 GMT + - Tue, 16 Aug 2022 10:07:31 GMT User-Agent: - - azsdk-python-communication-phonenumbers/1.0.1 Python/3.6.7 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - - 4gT6hwYkybeyRb/nFizXtBsR2Z5JTg6RrOJHob619C8= + - sq4lThaGNBDPKP9+xtS7DLgXPEDmjEKOV27k5AF8YOU= x-ms-return-client-request-id: - 'true' method: POST @@ -456,27 +462,29 @@ interactions: access-control-expose-headers: - Operation-Location,operation-id,purchase-id api-supported-versions: - - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive content-length: - '0' date: - - Fri, 10 Jun 2022 00:32:04 GMT + - Tue, 16 Aug 2022 10:07:35 GMT ms-cv: - - kvuFUQZsIEe8U5kL4tYXkQ.0 + - ygJ0nI9VYEWZy5swSo4hCg.0 operation-id: - - purchase_9ee520b5-b3e2-4d78-a93e-9ce72f84a2d8 + - purchase_8a682b75-077d-4e91-abed-1daf1878c8c2 operation-location: - - /phoneNumbers/operations/purchase_9ee520b5-b3e2-4d78-a93e-9ce72f84a2d8?api-version=2021-03-07 + - /phoneNumbers/operations/purchase_8a682b75-077d-4e91-abed-1daf1878c8c2?api-version=2021-03-07 purchase-id: - - 9ee520b5-b3e2-4d78-a93e-9ce72f84a2d8 + - 8a682b75-077d-4e91-abed-1daf1878c8c2 strict-transport-security: - max-age=2592000 x-azure-ref: - - 0ApGiYgAAAAAi+0TobkonSaHUuNJUrsN2WVZSMzExMDAwMTE1MDQ5ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + - 20220816T100733Z-zvdmwacghh4c97ggppewnyshxn00000000eg00000003an27 x-cache: - CONFIG_NOCACHE x-processing-time: - - 2577ms + - 2114ms status: code: 202 message: Accepted @@ -490,39 +498,41 @@ interactions: Connection: - keep-alive Date: - - Fri, 10 Jun 2022 00:32:35 GMT + - Tue, 16 Aug 2022 10:08:04 GMT User-Agent: - - azsdk-python-communication-phonenumbers/1.0.1 Python/3.6.7 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-return-client-request-id: - 'true' method: GET - uri: https://sanitized.communication.azure.com/phoneNumbers/operations/purchase_9ee520b5-b3e2-4d78-a93e-9ce72f84a2d8?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/phoneNumbers/operations/purchase_8a682b75-077d-4e91-abed-1daf1878c8c2?api-version=2021-03-07 response: body: string: '{"operationType": "purchase", "status": "succeeded", "resourceLocation": - null, "createdDateTime": "2022-06-10T00:31:29.987717+00:00", "id": "purchase_9ee520b5-b3e2-4d78-a93e-9ce72f84a2d8", + null, "createdDateTime": "2022-08-16T10:07:01.0017812+00:00", "id": "purchase_8a682b75-077d-4e91-abed-1daf1878c8c2", "lastActionDateTime": "0001-01-01T00:00:00+00:00"}' headers: api-supported-versions: - - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive content-type: - application/json; charset=utf-8 date: - - Fri, 10 Jun 2022 00:32:35 GMT + - Tue, 16 Aug 2022 10:08:06 GMT ms-cv: - - t7E+qYnrZUqhlNUAgurExw.0 + - MUIKHohP2kCB/ZH9XZqeLg.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-azure-ref: - - 0I5GiYgAAAABVAffr+9LHSJGE79ONoYv7WVZSMzExMDAwMTE1MDQ5ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + - 20220816T100805Z-zvdmwacghh4c97ggppewnyshxn00000000eg00000003awt4 x-cache: - CONFIG_NOCACHE x-processing-time: - - 523ms + - 434ms status: code: 200 message: OK @@ -542,9 +552,9 @@ interactions: Content-Type: - application/json Date: - - Fri, 10 Jun 2022 00:32:36 GMT + - Tue, 16 Aug 2022 10:08:04 GMT User-Agent: - - azsdk-python-communication-phonenumbers/1.0.1 Python/3.6.7 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - ecyowPPqS6i2jEjg4ZPaHAki9yDR8IHa8lF+VXRefVM= x-ms-return-client-request-id: @@ -558,29 +568,31 @@ interactions: access-control-expose-headers: - Location,Operation-Location,operation-id,search-id api-supported-versions: - - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive content-length: - '0' date: - - Fri, 10 Jun 2022 00:32:39 GMT + - Tue, 16 Aug 2022 10:08:09 GMT location: - - /availablePhoneNumbers/searchResults/ae35ad5e-1138-47ef-b1b6-ce579796d10f?api-version=2021-03-07 + - /availablePhoneNumbers/searchResults/3984011c-cde0-4082-aa91-916633f7c5ff?api-version=2021-03-07 ms-cv: - - mHXHn77MrUq/c5IGFEXqTw.0 + - SBT3T1ed4UmjiShBRoVQYg.0 operation-id: - - search_ae35ad5e-1138-47ef-b1b6-ce579796d10f + - search_3984011c-cde0-4082-aa91-916633f7c5ff operation-location: - - /phoneNumbers/operations/search_ae35ad5e-1138-47ef-b1b6-ce579796d10f?api-version=2021-03-07 + - /phoneNumbers/operations/search_3984011c-cde0-4082-aa91-916633f7c5ff?api-version=2021-03-07 search-id: - - ae35ad5e-1138-47ef-b1b6-ce579796d10f + - 3984011c-cde0-4082-aa91-916633f7c5ff strict-transport-security: - max-age=2592000 x-azure-ref: - - 0JJGiYgAAAAAzHwJIGxcORrGdtKls3X2FWVZSMzExMDAwMTE1MDMxADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + - 20220816T100806Z-zvdmwacghh4c97ggppewnyshxn00000000e000000003vya4 x-cache: - CONFIG_NOCACHE x-processing-time: - - 3047ms + - 2338ms status: code: 202 message: Accepted @@ -594,44 +606,46 @@ interactions: Connection: - keep-alive Date: - - Fri, 10 Jun 2022 00:33:09 GMT + - Tue, 16 Aug 2022 10:08:37 GMT User-Agent: - - azsdk-python-communication-phonenumbers/1.0.1 Python/3.6.7 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-return-client-request-id: - 'true' method: GET - uri: https://sanitized.communication.azure.com/phoneNumbers/operations/search_ae35ad5e-1138-47ef-b1b6-ce579796d10f?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/phoneNumbers/operations/search_3984011c-cde0-4082-aa91-916633f7c5ff?api-version=2021-03-07 response: body: string: '{"operationType": "search", "status": "succeeded", "resourceLocation": - "/availablePhoneNumbers/searchResults/ae35ad5e-1138-47ef-b1b6-ce579796d10f?api-version=2021-03-07", - "createdDateTime": "2022-06-10T00:32:39.0104623+00:00", "id": "search_ae35ad5e-1138-47ef-b1b6-ce579796d10f", + "/availablePhoneNumbers/searchResults/3984011c-cde0-4082-aa91-916633f7c5ff?api-version=2021-03-07", + "createdDateTime": "2022-08-16T10:08:08.7113048+00:00", "id": "search_3984011c-cde0-4082-aa91-916633f7c5ff", "lastActionDateTime": "0001-01-01T00:00:00+00:00"}' headers: access-control-expose-headers: - Location api-supported-versions: - - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive content-type: - application/json; charset=utf-8 date: - - Fri, 10 Jun 2022 00:33:09 GMT + - Tue, 16 Aug 2022 10:08:40 GMT location: - - /availablePhoneNumbers/searchResults/ae35ad5e-1138-47ef-b1b6-ce579796d10f?api-version=2021-03-07 + - /availablePhoneNumbers/searchResults/3984011c-cde0-4082-aa91-916633f7c5ff?api-version=2021-03-07 ms-cv: - - /h9iuNBSuEOBdmP5q3GFMw.0 + - 5OrMJs24IEahulzmZiLiUQ.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-azure-ref: - - 0RZGiYgAAAADN8MXhG+tMTJdoN3ugIt6vWVZSMzExMDAwMTE1MDMxADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + - 20220816T100839Z-zvdmwacghh4c97ggppewnyshxn00000000e000000003wa7h x-cache: - CONFIG_NOCACHE x-processing-time: - - 383ms + - 962ms status: code: 200 message: OK @@ -646,47 +660,49 @@ interactions: Connection: - keep-alive Date: - - Fri, 10 Jun 2022 00:33:10 GMT + - Tue, 16 Aug 2022 10:08:38 GMT User-Agent: - - azsdk-python-communication-phonenumbers/1.0.1 Python/3.6.7 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-return-client-request-id: - 'true' method: GET - uri: https://sanitized.communication.azure.com/availablePhoneNumbers/searchResults/ae35ad5e-1138-47ef-b1b6-ce579796d10f?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/availablePhoneNumbers/searchResults/3984011c-cde0-4082-aa91-916633f7c5ff?api-version=2021-03-07 response: body: - string: '{"searchId": "ae35ad5e-1138-47ef-b1b6-ce579796d10f", "phoneNumbers": - ["+18772141128"], "phoneNumberType": "tollFree", "assignmentType": "application", + string: '{"searchId": "3984011c-cde0-4082-aa91-916633f7c5ff", "phoneNumbers": + ["+18772189809"], "phoneNumberType": "tollFree", "assignmentType": "application", "capabilities": {"calling": "inbound", "sms": "inbound+outbound"}, "cost": {"amount": 2.0, "currencyCode": "USD", "billingFrequency": "monthly"}, "searchExpiresBy": - "2022-06-10T00:48:41.0192184+00:00"}' + "2022-08-16T10:24:11.0789309+00:00"}' headers: api-supported-versions: - - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive content-type: - application/json; charset=utf-8 date: - - Fri, 10 Jun 2022 00:33:10 GMT + - Tue, 16 Aug 2022 10:08:41 GMT ms-cv: - - 34BG4q70TEqPdoVVeDvQtA.0 + - MVBPKeg8PUKUSlXjh59+ew.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-azure-ref: - - 0RZGiYgAAAAAaTb4eRjM+QbswrRpuXUc3WVZSMzExMDAwMTE1MDMxADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + - 20220816T100840Z-zvdmwacghh4c97ggppewnyshxn00000000e000000003wam7 x-cache: - CONFIG_NOCACHE x-processing-time: - - 1052ms + - 1101ms status: code: 200 message: OK url: sanitized - request: - body: '{"searchId": "ae35ad5e-1138-47ef-b1b6-ce579796d10f"}' + body: '{"searchId": "3984011c-cde0-4082-aa91-916633f7c5ff"}' headers: Accept: - application/json @@ -699,11 +715,11 @@ interactions: Content-Type: - application/json Date: - - Fri, 10 Jun 2022 00:33:11 GMT + - Tue, 16 Aug 2022 10:08:40 GMT User-Agent: - - azsdk-python-communication-phonenumbers/1.0.1 Python/3.6.7 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - - xb/h6KWvvBXU4pGpU9/e+VsfP1lIoCTUmlHew4CxKew= + - 5FW0k5ebrPfr4ZeqcBvD15tckNYu3ibo2nJhTdrFArc= x-ms-return-client-request-id: - 'true' method: POST @@ -715,27 +731,29 @@ interactions: access-control-expose-headers: - Operation-Location,operation-id,purchase-id api-supported-versions: - - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive content-length: - '0' date: - - Fri, 10 Jun 2022 00:33:12 GMT + - Tue, 16 Aug 2022 10:08:43 GMT ms-cv: - - r2McfMGad0m6O0OfTjpfYQ.0 + - 9az57h+QX0232+wYHn+lCg.0 operation-id: - - purchase_ae35ad5e-1138-47ef-b1b6-ce579796d10f + - purchase_3984011c-cde0-4082-aa91-916633f7c5ff operation-location: - - /phoneNumbers/operations/purchase_ae35ad5e-1138-47ef-b1b6-ce579796d10f?api-version=2021-03-07 + - /phoneNumbers/operations/purchase_3984011c-cde0-4082-aa91-916633f7c5ff?api-version=2021-03-07 purchase-id: - - ae35ad5e-1138-47ef-b1b6-ce579796d10f + - 3984011c-cde0-4082-aa91-916633f7c5ff strict-transport-security: - max-age=2592000 x-azure-ref: - - 0R5GiYgAAAACKOcURNINHS6oLMXoBnxZOWVZSMzExMDAwMTE1MDMxADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + - 20220816T100841Z-zvdmwacghh4c97ggppewnyshxn00000000e000000003wazq x-cache: - CONFIG_NOCACHE x-processing-time: - - 1932ms + - 2231ms status: code: 202 message: Accepted @@ -749,39 +767,41 @@ interactions: Connection: - keep-alive Date: - - Fri, 10 Jun 2022 00:33:43 GMT + - Tue, 16 Aug 2022 10:09:12 GMT User-Agent: - - azsdk-python-communication-phonenumbers/1.0.1 Python/3.6.7 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-return-client-request-id: - 'true' method: GET - uri: https://sanitized.communication.azure.com/phoneNumbers/operations/purchase_ae35ad5e-1138-47ef-b1b6-ce579796d10f?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/phoneNumbers/operations/purchase_3984011c-cde0-4082-aa91-916633f7c5ff?api-version=2021-03-07 response: body: string: '{"operationType": "purchase", "status": "succeeded", "resourceLocation": - null, "createdDateTime": "2022-06-10T00:32:39.0104623+00:00", "id": "purchase_ae35ad5e-1138-47ef-b1b6-ce579796d10f", + null, "createdDateTime": "2022-08-16T10:08:08.7113048+00:00", "id": "purchase_3984011c-cde0-4082-aa91-916633f7c5ff", "lastActionDateTime": "0001-01-01T00:00:00+00:00"}' headers: api-supported-versions: - - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive content-type: - application/json; charset=utf-8 date: - - Fri, 10 Jun 2022 00:33:43 GMT + - Tue, 16 Aug 2022 10:09:14 GMT ms-cv: - - bCvrtDlNo061lBh9dwzOfA.0 + - 72pPCtuQf0enlB6Sz/b+jw.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-azure-ref: - - 0Z5GiYgAAAAAUai8L+74jRLA3CpgNyTtZWVZSMzExMDAwMTE1MDMxADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + - 20220816T100914Z-zvdmwacghh4c97ggppewnyshxn00000000e000000003wpy9 x-cache: - CONFIG_NOCACHE x-processing-time: - - 505ms + - 385ms status: code: 200 message: OK @@ -803,11 +823,11 @@ interactions: Content-Type: - application/json Date: - - Fri, 10 Jun 2022 00:33:44 GMT + - Tue, 16 Aug 2022 10:09:13 GMT User-Agent: - - azsdk-python-communication-sms/1.0.1 Python/3.6.7 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-sms/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - - 6RZC16+wt2HTn777vQeKwmnhn5prkv+gWuEl64AtAY4= + - 6vRg0bwSbO1/YKAV/HD5UL0DivdYG+vB8OKAoNNh7p4= x-ms-return-client-request-id: - 'true' method: POST @@ -826,19 +846,19 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Fri, 10 Jun 2022 00:33:44 GMT + - Tue, 16 Aug 2022 10:09:15 GMT ms-cv: - - 693m7+l1fkW7uVBTNlo9wQ.0 + - FaEpKA/jDEO6v2m2+eYccQ.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-azure-ref: - - 20220610T003343Z-0w7e84pgat29pcfezeursvyhe400000000zg00000001ryy4 + - 20220816T100914Z-zvdmwacghh4c97ggppewnyshxn00000000eg00000003beur x-cache: - CONFIG_NOCACHE x-processing-time: - - 300ms + - 282ms status: code: 202 message: Accepted diff --git a/src/communication/azext_communication/tests/latest/recordings/test_show_phonenumbers.yaml b/src/communication/azext_communication/tests/latest/recordings/test_show_phonenumbers.yaml index d924533ff31..7b896d74158 100644 --- a/src/communication/azext_communication/tests/latest/recordings/test_show_phonenumbers.yaml +++ b/src/communication/azext_communication/tests/latest/recordings/test_show_phonenumbers.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json Date: - - Wed, 08 Jun 2022 18:00:50 GMT + - Tue, 16 Aug 2022 10:03:00 GMT User-Agent: - - azsdk-python-communication-phonenumbers/1.0.1 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - ecyowPPqS6i2jEjg4ZPaHAki9yDR8IHa8lF+VXRefVM= x-ms-return-client-request-id: @@ -30,29 +30,31 @@ interactions: access-control-expose-headers: - Location,Operation-Location,operation-id,search-id api-supported-versions: - - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive content-length: - '0' date: - - Wed, 08 Jun 2022 18:00:54 GMT + - Tue, 16 Aug 2022 10:03:06 GMT location: - - /availablePhoneNumbers/searchResults/1a2d9e4f-67ac-4504-8085-bf164927bab1?api-version=2021-03-07 + - /availablePhoneNumbers/searchResults/8f12c81b-e019-4034-bcca-53cf2f5f01f6?api-version=2021-03-07 ms-cv: - - +95abflzOUmlk3tSLWhRLQ.0 + - +1c7q4/tqEqxDBSk+8nj/g.0 operation-id: - - search_1a2d9e4f-67ac-4504-8085-bf164927bab1 + - search_8f12c81b-e019-4034-bcca-53cf2f5f01f6 operation-location: - - /phoneNumbers/operations/search_1a2d9e4f-67ac-4504-8085-bf164927bab1?api-version=2021-03-07 + - /phoneNumbers/operations/search_8f12c81b-e019-4034-bcca-53cf2f5f01f6?api-version=2021-03-07 search-id: - - 1a2d9e4f-67ac-4504-8085-bf164927bab1 + - 8f12c81b-e019-4034-bcca-53cf2f5f01f6 strict-transport-security: - max-age=2592000 x-azure-ref: - - 00uOgYgAAAAAS+y0Jx9PyRprYYcDyXUEjWVZSMzExMDAwMTE2MDE3ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + - 20220816T100302Z-r0s9pbvvdt0w72q6sqrkc1ktpw00000005gg00000000hgkz x-cache: - CONFIG_NOCACHE x-processing-time: - - 4165ms + - 3732ms status: code: 202 message: Accepted @@ -66,44 +68,46 @@ interactions: Connection: - keep-alive Date: - - Wed, 08 Jun 2022 18:01:25 GMT + - Tue, 16 Aug 2022 10:03:35 GMT User-Agent: - - azsdk-python-communication-phonenumbers/1.0.1 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-return-client-request-id: - 'true' method: GET - uri: https://sanitized.communication.azure.com/phoneNumbers/operations/search_1a2d9e4f-67ac-4504-8085-bf164927bab1?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/phoneNumbers/operations/search_8f12c81b-e019-4034-bcca-53cf2f5f01f6?api-version=2021-03-07 response: body: string: '{"operationType": "search", "status": "succeeded", "resourceLocation": - "/availablePhoneNumbers/searchResults/1a2d9e4f-67ac-4504-8085-bf164927bab1?api-version=2021-03-07", - "createdDateTime": "2022-06-08T18:00:54.7468605+00:00", "id": "sanitized", + "/availablePhoneNumbers/searchResults/8f12c81b-e019-4034-bcca-53cf2f5f01f6?api-version=2021-03-07", + "createdDateTime": "2022-08-16T10:03:06.0364696+00:00", "id": "sanitized", "lastActionDateTime": "0001-01-01T00:00:00+00:00"}' headers: access-control-expose-headers: - Location api-supported-versions: - - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive content-type: - application/json; charset=utf-8 date: - - Wed, 08 Jun 2022 18:01:24 GMT + - Tue, 16 Aug 2022 10:03:36 GMT location: - - /availablePhoneNumbers/searchResults/1a2d9e4f-67ac-4504-8085-bf164927bab1?api-version=2021-03-07 + - /availablePhoneNumbers/searchResults/8f12c81b-e019-4034-bcca-53cf2f5f01f6?api-version=2021-03-07 ms-cv: - - 9+nN/zPYvEyJH6ULvl7dvw.0 + - Z9SSZK/h/ECKnhNJzf0gZg.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-azure-ref: - - 09eOgYgAAAACO5C35sAplQrhPfjRIIIDkWVZSMzExMDAwMTE2MDE3ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + - 20220816T100336Z-r0s9pbvvdt0w72q6sqrkc1ktpw00000005gg00000000hmsn x-cache: - CONFIG_NOCACHE x-processing-time: - - 439ms + - 356ms status: code: 200 message: OK @@ -118,47 +122,49 @@ interactions: Connection: - keep-alive Date: - - Wed, 08 Jun 2022 18:01:26 GMT + - Tue, 16 Aug 2022 10:03:35 GMT User-Agent: - - azsdk-python-communication-phonenumbers/1.0.1 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-return-client-request-id: - 'true' method: GET - uri: https://sanitized.communication.azure.com/availablePhoneNumbers/searchResults/1a2d9e4f-67ac-4504-8085-bf164927bab1?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/availablePhoneNumbers/searchResults/8f12c81b-e019-4034-bcca-53cf2f5f01f6?api-version=2021-03-07 response: body: - string: '{"searchId": "1a2d9e4f-67ac-4504-8085-bf164927bab1", "phoneNumbers": + string: '{"searchId": "8f12c81b-e019-4034-bcca-53cf2f5f01f6", "phoneNumbers": ["sanitized"], "phoneNumberType": "tollFree", "assignmentType": "application", "capabilities": {"calling": "inbound", "sms": "inbound+outbound"}, "cost": {"amount": 2.0, "currencyCode": "USD", "billingFrequency": "monthly"}, "searchExpiresBy": - "2022-06-08T18:16:56.9281142+00:00"}' + "2022-08-16T10:19:08.3996101+00:00"}' headers: api-supported-versions: - - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive content-type: - application/json; charset=utf-8 date: - - Wed, 08 Jun 2022 18:01:26 GMT + - Tue, 16 Aug 2022 10:03:38 GMT ms-cv: - - DfhdOwAgzkuRawjRAras0w.0 + - HpHvKjQ/WUGH0j19aE0MBA.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-azure-ref: - - 09eOgYgAAAACzzt9J629RQ4ozG60tJ887WVZSMzExMDAwMTE2MDE3ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + - 20220816T100337Z-r0s9pbvvdt0w72q6sqrkc1ktpw00000005gg00000000hmu6 x-cache: - CONFIG_NOCACHE x-processing-time: - - 945ms + - 1075ms status: code: 200 message: OK url: sanitized - request: - body: '{"searchId": "1a2d9e4f-67ac-4504-8085-bf164927bab1"}' + body: '{"searchId": "8f12c81b-e019-4034-bcca-53cf2f5f01f6"}' headers: Accept: - application/json @@ -171,11 +177,11 @@ interactions: Content-Type: - application/json Date: - - Wed, 08 Jun 2022 18:01:27 GMT + - Tue, 16 Aug 2022 10:03:36 GMT User-Agent: - - azsdk-python-communication-phonenumbers/1.0.1 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - - v84BmvdsKwYRawMlPEH3VbuI+187cFdqCQSoJro/11E= + - EyiY9jr3cEVUECWEm8g3qkuWoZbbHyOHMPgXnp+RpYA= x-ms-return-client-request-id: - 'true' method: POST @@ -187,27 +193,29 @@ interactions: access-control-expose-headers: - Operation-Location,operation-id,purchase-id api-supported-versions: - - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive content-length: - '0' date: - - Wed, 08 Jun 2022 18:01:28 GMT + - Tue, 16 Aug 2022 10:03:40 GMT ms-cv: - - /O20/K3SKkeqgSvN2PRshw.0 + - tTwCSUcxVk2zbcbQOTIFoA.0 operation-id: - - purchase_1a2d9e4f-67ac-4504-8085-bf164927bab1 + - purchase_8f12c81b-e019-4034-bcca-53cf2f5f01f6 operation-location: - - /phoneNumbers/operations/purchase_1a2d9e4f-67ac-4504-8085-bf164927bab1?api-version=2021-03-07 + - /phoneNumbers/operations/purchase_8f12c81b-e019-4034-bcca-53cf2f5f01f6?api-version=2021-03-07 purchase-id: - - 1a2d9e4f-67ac-4504-8085-bf164927bab1 + - 8f12c81b-e019-4034-bcca-53cf2f5f01f6 strict-transport-security: - max-age=2592000 x-azure-ref: - - 09uOgYgAAAADXwQN7buKLTqLYWJYgXcY2WVZSMzExMDAwMTE2MDE3ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + - 20220816T100338Z-r0s9pbvvdt0w72q6sqrkc1ktpw00000005gg00000000hmye x-cache: - CONFIG_NOCACHE x-processing-time: - - 2091ms + - 2139ms status: code: 202 message: Accepted @@ -221,39 +229,41 @@ interactions: Connection: - keep-alive Date: - - Wed, 08 Jun 2022 18:01:59 GMT + - Tue, 16 Aug 2022 10:04:08 GMT User-Agent: - - azsdk-python-communication-phonenumbers/1.0.1 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-return-client-request-id: - 'true' method: GET - uri: https://sanitized.communication.azure.com/phoneNumbers/operations/purchase_1a2d9e4f-67ac-4504-8085-bf164927bab1?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/phoneNumbers/operations/purchase_8f12c81b-e019-4034-bcca-53cf2f5f01f6?api-version=2021-03-07 response: body: string: '{"operationType": "purchase", "status": "succeeded", "resourceLocation": - null, "createdDateTime": "2022-06-08T18:00:54.7468605+00:00", "id": "sanitized", + null, "createdDateTime": "2022-08-16T10:03:06.0364696+00:00", "id": "sanitized", "lastActionDateTime": "0001-01-01T00:00:00+00:00"}' headers: api-supported-versions: - - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive content-type: - application/json; charset=utf-8 date: - - Wed, 08 Jun 2022 18:01:59 GMT + - Tue, 16 Aug 2022 10:04:10 GMT ms-cv: - - cx4cPLs0bEmoRvdTGlJGYg.0 + - jj0thRThXkaGRpL3QErqkQ.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-azure-ref: - - 0F+SgYgAAAADOic9R8uaWTJ/mL8KB/xBVWVZSMzExMDAwMTE2MDE3ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + - 20220816T100410Z-r0s9pbvvdt0w72q6sqrkc1ktpw00000005gg00000000hqz6 x-cache: - CONFIG_NOCACHE x-processing-time: - - 384ms + - 373ms status: code: 200 message: OK @@ -268,9 +278,9 @@ interactions: Connection: - keep-alive Date: - - Wed, 08 Jun 2022 18:02:00 GMT + - Tue, 16 Aug 2022 10:04:09 GMT User-Agent: - - azsdk-python-communication-phonenumbers/1.0.1 Python/3.6.7 (Windows-10-10.0.22000-SP0) + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) x-ms-content-sha256: - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= x-ms-return-client-request-id: @@ -281,27 +291,29 @@ interactions: body: string: '{"id": "sanitized", "phoneNumber": "sanitized", "countryCode": "US", "phoneNumberType": "tollFree", "capabilities": {"calling": "inbound", "sms": - "inbound+outbound"}, "assignmentType": "application", "purchaseDate": "2022-06-08T18:01:44.9739305+00:00", + "inbound+outbound"}, "assignmentType": "application", "purchaseDate": "2022-08-16T10:03:56.2185351+00:00", "cost": {"amount": 2.0, "currencyCode": "USD", "billingFrequency": "monthly"}}' headers: api-supported-versions: - - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive content-type: - application/json; charset=utf-8 date: - - Wed, 08 Jun 2022 18:02:01 GMT + - Tue, 16 Aug 2022 10:04:13 GMT ms-cv: - - p1Tqe4PGSUyRGbMpaAW3xg.0 + - /00VHMqZaUGOuOO3Ag7S+g.0 strict-transport-security: - max-age=2592000 transfer-encoding: - chunked x-azure-ref: - - 0F+SgYgAAAAA7kwsqPWzWR4qQCGjVjRalWVZSMzExMDAwMTE2MDIzADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + - 20220816T100411Z-p18hf8s3dx4xf8cgexx53pe93400000000dg00000000enum x-cache: - CONFIG_NOCACHE x-processing-time: - - 2459ms + - 2017ms status: code: 200 message: OK diff --git a/src/communication/azext_communication/tests/latest/recordings/test_sms_send.yaml b/src/communication/azext_communication/tests/latest/recordings/test_sms_send.yaml new file mode 100644 index 00000000000..ad0d8445e85 --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_sms_send.yaml @@ -0,0 +1,325 @@ +interactions: +- request: + body: '{"phoneNumberType": "tollFree", "assignmentType": "application", "capabilities": + {"calling": "inbound", "sms": "inbound+outbound"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '131' + Content-Type: + - application/json + Date: + - Tue, 16 Aug 2022 10:05:47 GMT + User-Agent: + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - ecyowPPqS6i2jEjg4ZPaHAki9yDR8IHa8lF+VXRefVM= + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/availablePhoneNumbers/countries/US/:search?api-version=2021-03-07 + response: + body: + string: '' + headers: + access-control-expose-headers: + - Location,Operation-Location,operation-id,search-id + api-supported-versions: + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive + content-length: + - '0' + date: + - Tue, 16 Aug 2022 10:05:54 GMT + location: + - /availablePhoneNumbers/searchResults/af48cfa2-7618-46bc-9cd5-d985edf0b899?api-version=2021-03-07 + ms-cv: + - aZwuOsteT0yiC+dG0ZNicg.0 + operation-id: + - search_af48cfa2-7618-46bc-9cd5-d985edf0b899 + operation-location: + - /phoneNumbers/operations/search_af48cfa2-7618-46bc-9cd5-d985edf0b899?api-version=2021-03-07 + search-id: + - af48cfa2-7618-46bc-9cd5-d985edf0b899 + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T100549Z-pvk0k4gqx51st0bh1fssf7cw3000000005g000000000xya6 + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 4368ms + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Date: + - Tue, 16 Aug 2022 10:06:22 GMT + User-Agent: + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= + x-ms-return-client-request-id: + - 'true' + method: GET + uri: https://sanitized.communication.azure.com/phoneNumbers/operations/search_af48cfa2-7618-46bc-9cd5-d985edf0b899?api-version=2021-03-07 + response: + body: + string: '{"operationType": "search", "status": "succeeded", "resourceLocation": + "/availablePhoneNumbers/searchResults/af48cfa2-7618-46bc-9cd5-d985edf0b899?api-version=2021-03-07", + "createdDateTime": "2022-08-16T10:05:53.8697119+00:00", "id": "search_af48cfa2-7618-46bc-9cd5-d985edf0b899", + "lastActionDateTime": "0001-01-01T00:00:00+00:00"}' + headers: + access-control-expose-headers: + - Location + api-supported-versions: + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 10:06:24 GMT + location: + - /availablePhoneNumbers/searchResults/af48cfa2-7618-46bc-9cd5-d985edf0b899?api-version=2021-03-07 + ms-cv: + - UjF984VsCUqoWQH19kHljA.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T100624Z-pvk0k4gqx51st0bh1fssf7cw3000000005g000000000y5qm + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 504ms + status: + code: 200 + message: OK + url: sanitized +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Date: + - Tue, 16 Aug 2022 10:06:23 GMT + User-Agent: + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= + x-ms-return-client-request-id: + - 'true' + method: GET + uri: https://sanitized.communication.azure.com/availablePhoneNumbers/searchResults/af48cfa2-7618-46bc-9cd5-d985edf0b899?api-version=2021-03-07 + response: + body: + string: '{"searchId": "af48cfa2-7618-46bc-9cd5-d985edf0b899", "phoneNumbers": + ["+18447291986"], "phoneNumberType": "tollFree", "assignmentType": "application", + "capabilities": {"calling": "inbound", "sms": "inbound+outbound"}, "cost": + {"amount": 2.0, "currencyCode": "USD", "billingFrequency": "monthly"}, "searchExpiresBy": + "2022-08-16T10:21:56.5998157+00:00"}' + headers: + api-supported-versions: + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 10:06:26 GMT + ms-cv: + - lz/P1wBGJkaz0KIOk574Pw.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T100625Z-pvk0k4gqx51st0bh1fssf7cw3000000005g000000000y5ue + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 1161ms + status: + code: 200 + message: OK + url: sanitized +- request: + body: '{"searchId": "af48cfa2-7618-46bc-9cd5-d985edf0b899"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '52' + Content-Type: + - application/json + Date: + - Tue, 16 Aug 2022 10:06:24 GMT + User-Agent: + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - lB2Xep9Ba7oWFPSHEd3suqi0up0I8ubo5txTqvij0V0= + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/availablePhoneNumbers/:purchase?api-version=2021-03-07 + response: + body: + string: '' + headers: + access-control-expose-headers: + - Operation-Location,operation-id,purchase-id + api-supported-versions: + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive + content-length: + - '0' + date: + - Tue, 16 Aug 2022 10:06:28 GMT + ms-cv: + - Y1q6qZ3YV0ic2ChRrgNIbw.0 + operation-id: + - purchase_af48cfa2-7618-46bc-9cd5-d985edf0b899 + operation-location: + - /phoneNumbers/operations/purchase_af48cfa2-7618-46bc-9cd5-d985edf0b899?api-version=2021-03-07 + purchase-id: + - af48cfa2-7618-46bc-9cd5-d985edf0b899 + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T100626Z-pvk0k4gqx51st0bh1fssf7cw3000000005g000000000y61v + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 2345ms + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Date: + - Tue, 16 Aug 2022 10:06:57 GMT + User-Agent: + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= + x-ms-return-client-request-id: + - 'true' + method: GET + uri: https://sanitized.communication.azure.com/phoneNumbers/operations/purchase_af48cfa2-7618-46bc-9cd5-d985edf0b899?api-version=2021-03-07 + response: + body: + string: '{"operationType": "purchase", "status": "succeeded", "resourceLocation": + null, "createdDateTime": "2022-08-16T10:05:53.8697119+00:00", "id": "purchase_af48cfa2-7618-46bc-9cd5-d985edf0b899", + "lastActionDateTime": "0001-01-01T00:00:00+00:00"}' + headers: + api-supported-versions: + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 10:06:59 GMT + ms-cv: + - bEZT5JxvakuEGqi5aaD4Xw.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T100658Z-pvk0k4gqx51st0bh1fssf7cw3000000005g000000000ybn6 + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 435ms + status: + code: 200 + message: OK + url: sanitized +- request: + body: '{"from": "sanitized", "smsRecipients": [{"to": "sanitized", "repeatabilityRequestId": + "sanitized", "repeatabilityFirstSent": "sanitized"}], "message": "Hello there!!", + "smsSendOptions": {"enableDeliveryReport": false}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '218' + Content-Type: + - application/json + Date: + - Tue, 16 Aug 2022 10:06:57 GMT + User-Agent: + - azsdk-python-communication-sms/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - H8CAc5clzgZGuTYXWOsRDbkqnqkvU9p9IMw++w2l90c= + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/sms?api-version=2021-03-07 + response: + body: + string: '{"value": [{"to": "sanitized", "messageId": "sanitized", "httpStatusCode": + 202, "repeatabilityResult": "accepted", "successful": true}]}' + headers: + api-supported-versions: + - 2020-07-20-preview1, 2020-08-20-preview, 2021-03-07 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 10:07:00 GMT + ms-cv: + - hquxFdVu6kaLsLS6LTNWMw.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T100659Z-0613xdc17h3t90gs2g8fdg5r64000000009g00000001zt3t + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 309ms + status: + code: 202 + message: Accepted + url: sanitized +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_sms_send_n_recipients.yaml b/src/communication/azext_communication/tests/latest/recordings/test_sms_send_n_recipients.yaml new file mode 100644 index 00000000000..12639bfb34b --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_sms_send_n_recipients.yaml @@ -0,0 +1,854 @@ +interactions: +- request: + body: '{"phoneNumberType": "tollFree", "assignmentType": "application", "capabilities": + {"calling": "inbound", "sms": "inbound+outbound"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '131' + Content-Type: + - application/json + Date: + - Tue, 16 Aug 2022 10:08:34 GMT + User-Agent: + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - ecyowPPqS6i2jEjg4ZPaHAki9yDR8IHa8lF+VXRefVM= + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/availablePhoneNumbers/countries/US/:search?api-version=2021-03-07 + response: + body: + string: '' + headers: + access-control-expose-headers: + - Location,Operation-Location,operation-id,search-id + api-supported-versions: + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive + content-length: + - '0' + date: + - Tue, 16 Aug 2022 10:08:39 GMT + location: + - /availablePhoneNumbers/searchResults/919284e1-03c2-45c8-b0c8-a656b37adf22?api-version=2021-03-07 + ms-cv: + - LUPf9vvjPUW3pA6TCiDz2w.0 + operation-id: + - search_919284e1-03c2-45c8-b0c8-a656b37adf22 + operation-location: + - /phoneNumbers/operations/search_919284e1-03c2-45c8-b0c8-a656b37adf22?api-version=2021-03-07 + search-id: + - 919284e1-03c2-45c8-b0c8-a656b37adf22 + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T100836Z-z5w8hfkph50p97tr7b7ay90rp000000000dg000000001n3s + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 2773ms + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Date: + - Tue, 16 Aug 2022 10:09:08 GMT + User-Agent: + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= + x-ms-return-client-request-id: + - 'true' + method: GET + uri: https://sanitized.communication.azure.com/phoneNumbers/operations/search_919284e1-03c2-45c8-b0c8-a656b37adf22?api-version=2021-03-07 + response: + body: + string: '{"operationType": "search", "status": "succeeded", "resourceLocation": + "/availablePhoneNumbers/searchResults/919284e1-03c2-45c8-b0c8-a656b37adf22?api-version=2021-03-07", + "createdDateTime": "2022-08-16T10:08:39.1184266+00:00", "id": "search_919284e1-03c2-45c8-b0c8-a656b37adf22", + "lastActionDateTime": "0001-01-01T00:00:00+00:00"}' + headers: + access-control-expose-headers: + - Location + api-supported-versions: + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 10:09:10 GMT + location: + - /availablePhoneNumbers/searchResults/919284e1-03c2-45c8-b0c8-a656b37adf22?api-version=2021-03-07 + ms-cv: + - t+3Tkuj7z0iMT7kK4HIk0w.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T100909Z-p18hf8s3dx4xf8cgexx53pe93400000000dg000000000fvb + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 463ms + status: + code: 200 + message: OK + url: sanitized +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Date: + - Tue, 16 Aug 2022 10:09:09 GMT + User-Agent: + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= + x-ms-return-client-request-id: + - 'true' + method: GET + uri: https://sanitized.communication.azure.com/availablePhoneNumbers/searchResults/919284e1-03c2-45c8-b0c8-a656b37adf22?api-version=2021-03-07 + response: + body: + string: '{"searchId": "919284e1-03c2-45c8-b0c8-a656b37adf22", "phoneNumbers": + ["+18772189974"], "phoneNumberType": "tollFree", "assignmentType": "application", + "capabilities": {"calling": "inbound", "sms": "inbound+outbound"}, "cost": + {"amount": 2.0, "currencyCode": "USD", "billingFrequency": "monthly"}, "searchExpiresBy": + "2022-08-16T10:24:40.7566140+00:00"}' + headers: + api-supported-versions: + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 10:09:12 GMT + ms-cv: + - 1BbC7U1eUE+kktYYJfNt7w.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T100910Z-p18hf8s3dx4xf8cgexx53pe93400000000dg000000000fvp + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 1178ms + status: + code: 200 + message: OK + url: sanitized +- request: + body: '{"searchId": "919284e1-03c2-45c8-b0c8-a656b37adf22"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '52' + Content-Type: + - application/json + Date: + - Tue, 16 Aug 2022 10:09:10 GMT + User-Agent: + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - j7Gtn4Ex5LwaxxGxPRkAqW0BIUctr/noPBUwI10IRpk= + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/availablePhoneNumbers/:purchase?api-version=2021-03-07 + response: + body: + string: '' + headers: + access-control-expose-headers: + - Operation-Location,operation-id,purchase-id + api-supported-versions: + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive + content-length: + - '0' + date: + - Tue, 16 Aug 2022 10:09:14 GMT + ms-cv: + - oVqaEQu/5Ee6hPFHlC2+Mw.0 + operation-id: + - purchase_919284e1-03c2-45c8-b0c8-a656b37adf22 + operation-location: + - /phoneNumbers/operations/purchase_919284e1-03c2-45c8-b0c8-a656b37adf22?api-version=2021-03-07 + purchase-id: + - 919284e1-03c2-45c8-b0c8-a656b37adf22 + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T100912Z-p18hf8s3dx4xf8cgexx53pe93400000000dg000000000fwd + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 2093ms + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Date: + - Tue, 16 Aug 2022 10:09:42 GMT + User-Agent: + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= + x-ms-return-client-request-id: + - 'true' + method: GET + uri: https://sanitized.communication.azure.com/phoneNumbers/operations/purchase_919284e1-03c2-45c8-b0c8-a656b37adf22?api-version=2021-03-07 + response: + body: + string: '{"operationType": "purchase", "status": "succeeded", "resourceLocation": + null, "createdDateTime": "2022-08-16T10:08:39.1184266+00:00", "id": "purchase_919284e1-03c2-45c8-b0c8-a656b37adf22", + "lastActionDateTime": "0001-01-01T00:00:00+00:00"}' + headers: + api-supported-versions: + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 10:09:44 GMT + ms-cv: + - nMK+51HE3UugFEbD6hpE/w.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T100944Z-p18hf8s3dx4xf8cgexx53pe93400000000dg000000000gn3 + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 433ms + status: + code: 200 + message: OK + url: sanitized +- request: + body: '{"phoneNumberType": "tollFree", "assignmentType": "application", "capabilities": + {"calling": "inbound", "sms": "inbound+outbound"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '131' + Content-Type: + - application/json + Date: + - Tue, 16 Aug 2022 10:09:43 GMT + User-Agent: + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - ecyowPPqS6i2jEjg4ZPaHAki9yDR8IHa8lF+VXRefVM= + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/availablePhoneNumbers/countries/US/:search?api-version=2021-03-07 + response: + body: + string: '' + headers: + access-control-expose-headers: + - Location,Operation-Location,operation-id,search-id + api-supported-versions: + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + content-length: + - '0' + date: + - Tue, 16 Aug 2022 10:09:46 GMT + location: + - /availablePhoneNumbers/searchResults/888a16c5-1b00-4243-b957-543eeb01ee0b?api-version=2021-03-07 + ms-cv: + - 8sKSG/xnEEygjsBVjpoSrQ.0 + operation-id: + - search_888a16c5-1b00-4243-b957-543eeb01ee0b + operation-location: + - /phoneNumbers/operations/search_888a16c5-1b00-4243-b957-543eeb01ee0b?api-version=2021-03-07 + search-id: + - 888a16c5-1b00-4243-b957-543eeb01ee0b + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 06Wz7YgAAAADcOKhqyziDRqXF4Vo9G9OhWVZSMzExMDAwMTE2MDIzADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 2401ms + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Date: + - Tue, 16 Aug 2022 10:10:16 GMT + User-Agent: + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= + x-ms-return-client-request-id: + - 'true' + method: GET + uri: https://sanitized.communication.azure.com/phoneNumbers/operations/search_888a16c5-1b00-4243-b957-543eeb01ee0b?api-version=2021-03-07 + response: + body: + string: '{"operationType": "search", "status": "succeeded", "resourceLocation": + "/availablePhoneNumbers/searchResults/888a16c5-1b00-4243-b957-543eeb01ee0b?api-version=2021-03-07", + "createdDateTime": "2022-08-16T10:09:47.4320949+00:00", "id": "search_888a16c5-1b00-4243-b957-543eeb01ee0b", + "lastActionDateTime": "0001-01-01T00:00:00+00:00"}' + headers: + access-control-expose-headers: + - Location + api-supported-versions: + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 10:10:18 GMT + location: + - /availablePhoneNumbers/searchResults/888a16c5-1b00-4243-b957-543eeb01ee0b?api-version=2021-03-07 + ms-cv: + - mYhNU4wXrEO/6U7cIDTQRA.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 0CW37YgAAAACOiHgpmh5TQrfg+uZLInGHWVZSMzExMDAwMTE2MDIzADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 416ms + status: + code: 200 + message: OK + url: sanitized +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Date: + - Tue, 16 Aug 2022 10:10:16 GMT + User-Agent: + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= + x-ms-return-client-request-id: + - 'true' + method: GET + uri: https://sanitized.communication.azure.com/availablePhoneNumbers/searchResults/888a16c5-1b00-4243-b957-543eeb01ee0b?api-version=2021-03-07 + response: + body: + string: '{"searchId": "888a16c5-1b00-4243-b957-543eeb01ee0b", "phoneNumbers": + ["+18772189551"], "phoneNumberType": "tollFree", "assignmentType": "application", + "capabilities": {"calling": "inbound", "sms": "inbound+outbound"}, "cost": + {"amount": 2.0, "currencyCode": "USD", "billingFrequency": "monthly"}, "searchExpiresBy": + "2022-08-16T10:25:49.8393498+00:00"}' + headers: + api-supported-versions: + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 10:10:19 GMT + ms-cv: + - vkEyYSnilEW0nyzqgWrY7Q.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 0Cm37YgAAAAAgcn5iaKhKS40MWy6PFuYFWVZSMzExMDAwMTE2MDIzADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 1162ms + status: + code: 200 + message: OK + url: sanitized +- request: + body: '{"searchId": "888a16c5-1b00-4243-b957-543eeb01ee0b"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '52' + Content-Type: + - application/json + Date: + - Tue, 16 Aug 2022 10:10:18 GMT + User-Agent: + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - ICM5KExCn+gl3hVv3WGIATN6FWeomouDcVX55uvseys= + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/availablePhoneNumbers/:purchase?api-version=2021-03-07 + response: + body: + string: '' + headers: + access-control-expose-headers: + - Operation-Location,operation-id,purchase-id + api-supported-versions: + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + content-length: + - '0' + date: + - Tue, 16 Aug 2022 10:10:21 GMT + ms-cv: + - E5blLeUobEK9GV8IWBb1Qg.0 + operation-id: + - purchase_888a16c5-1b00-4243-b957-543eeb01ee0b + operation-location: + - /phoneNumbers/operations/purchase_888a16c5-1b00-4243-b957-543eeb01ee0b?api-version=2021-03-07 + purchase-id: + - 888a16c5-1b00-4243-b957-543eeb01ee0b + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 0C237YgAAAABWg6TNNj8aTpkmX8NeshGtWVZSMzExMDAwMTE2MDIzADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 2176ms + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Date: + - Tue, 16 Aug 2022 10:10:50 GMT + User-Agent: + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= + x-ms-return-client-request-id: + - 'true' + method: GET + uri: https://sanitized.communication.azure.com/phoneNumbers/operations/purchase_888a16c5-1b00-4243-b957-543eeb01ee0b?api-version=2021-03-07 + response: + body: + string: '{"operationType": "purchase", "status": "succeeded", "resourceLocation": + null, "createdDateTime": "2022-08-16T10:09:47.4320949+00:00", "id": "purchase_888a16c5-1b00-4243-b957-543eeb01ee0b", + "lastActionDateTime": "0001-01-01T00:00:00+00:00"}' + headers: + api-supported-versions: + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 10:10:51 GMT + ms-cv: + - 4ju1CL8/qkasaZn/B//YVQ.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 0K237YgAAAABcMISMO4fbR5rpmf/Cf0JdWVZSMzExMDAwMTE2MDIzADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 337ms + status: + code: 200 + message: OK + url: sanitized +- request: + body: '{"phoneNumberType": "tollFree", "assignmentType": "application", "capabilities": + {"calling": "inbound", "sms": "inbound+outbound"}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '131' + Content-Type: + - application/json + Date: + - Tue, 16 Aug 2022 10:10:50 GMT + User-Agent: + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - ecyowPPqS6i2jEjg4ZPaHAki9yDR8IHa8lF+VXRefVM= + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/availablePhoneNumbers/countries/US/:search?api-version=2021-03-07 + response: + body: + string: '' + headers: + access-control-expose-headers: + - Location,Operation-Location,operation-id,search-id + api-supported-versions: + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive + content-length: + - '0' + date: + - Tue, 16 Aug 2022 10:11:12 GMT + location: + - /availablePhoneNumbers/searchResults/84d84d57-9b8e-4dd9-84b2-621333c64b98?api-version=2021-03-07 + ms-cv: + - pLjCV0sku0elTvSCu5ahVg.0 + operation-id: + - search_84d84d57-9b8e-4dd9-84b2-621333c64b98 + operation-location: + - /phoneNumbers/operations/search_84d84d57-9b8e-4dd9-84b2-621333c64b98?api-version=2021-03-07 + search-id: + - 84d84d57-9b8e-4dd9-84b2-621333c64b98 + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T101052Z-zvdmwacghh4c97ggppewnyshxn00000000gg00000000c58e + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 19948ms + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Date: + - Tue, 16 Aug 2022 10:11:41 GMT + User-Agent: + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= + x-ms-return-client-request-id: + - 'true' + method: GET + uri: https://sanitized.communication.azure.com/phoneNumbers/operations/search_84d84d57-9b8e-4dd9-84b2-621333c64b98?api-version=2021-03-07 + response: + body: + string: '{"operationType": "search", "status": "succeeded", "resourceLocation": + "/availablePhoneNumbers/searchResults/84d84d57-9b8e-4dd9-84b2-621333c64b98?api-version=2021-03-07", + "createdDateTime": "2022-08-16T10:11:12.497644+00:00", "id": "search_84d84d57-9b8e-4dd9-84b2-621333c64b98", + "lastActionDateTime": "0001-01-01T00:00:00+00:00"}' + headers: + access-control-expose-headers: + - Location + api-supported-versions: + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 10:11:43 GMT + location: + - /availablePhoneNumbers/searchResults/84d84d57-9b8e-4dd9-84b2-621333c64b98?api-version=2021-03-07 + ms-cv: + - EhAvSMok/0WHuxu7ImgNMA.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T101142Z-zvdmwacghh4c97ggppewnyshxn00000000gg00000000c6v7 + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 393ms + status: + code: 200 + message: OK + url: sanitized +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Date: + - Tue, 16 Aug 2022 10:11:41 GMT + User-Agent: + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= + x-ms-return-client-request-id: + - 'true' + method: GET + uri: https://sanitized.communication.azure.com/availablePhoneNumbers/searchResults/84d84d57-9b8e-4dd9-84b2-621333c64b98?api-version=2021-03-07 + response: + body: + string: '{"searchId": "84d84d57-9b8e-4dd9-84b2-621333c64b98", "phoneNumbers": + ["+18447314618"], "phoneNumberType": "tollFree", "assignmentType": "application", + "capabilities": {"calling": "inbound", "sms": "inbound+outbound"}, "cost": + {"amount": 2.0, "currencyCode": "USD", "billingFrequency": "monthly"}, "searchExpiresBy": + "2022-08-16T10:27:14.6528183+00:00"}' + headers: + api-supported-versions: + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 10:11:44 GMT + ms-cv: + - 8Rzs1CabkkOLBeZq5THT1g.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T101143Z-zvdmwacghh4c97ggppewnyshxn00000000gg00000000c6vg + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 1176ms + status: + code: 200 + message: OK + url: sanitized +- request: + body: '{"searchId": "84d84d57-9b8e-4dd9-84b2-621333c64b98"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '52' + Content-Type: + - application/json + Date: + - Tue, 16 Aug 2022 10:11:43 GMT + User-Agent: + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - tikyyT2lWHgRGRLmU5699CzBegu42BBuaARC/9tg1Co= + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/availablePhoneNumbers/:purchase?api-version=2021-03-07 + response: + body: + string: '' + headers: + access-control-expose-headers: + - Operation-Location,operation-id,purchase-id + api-supported-versions: + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive + content-length: + - '0' + date: + - Tue, 16 Aug 2022 10:11:46 GMT + ms-cv: + - l7KymyQPqEu4CdtVFMFxJA.0 + operation-id: + - purchase_84d84d57-9b8e-4dd9-84b2-621333c64b98 + operation-location: + - /phoneNumbers/operations/purchase_84d84d57-9b8e-4dd9-84b2-621333c64b98?api-version=2021-03-07 + purchase-id: + - 84d84d57-9b8e-4dd9-84b2-621333c64b98 + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T101144Z-zvdmwacghh4c97ggppewnyshxn00000000gg00000000c6w8 + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 2135ms + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Date: + - Tue, 16 Aug 2022 10:12:15 GMT + User-Agent: + - azsdk-python-communication-phonenumbers/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - 47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU= + x-ms-return-client-request-id: + - 'true' + method: GET + uri: https://sanitized.communication.azure.com/phoneNumbers/operations/purchase_84d84d57-9b8e-4dd9-84b2-621333c64b98?api-version=2021-03-07 + response: + body: + string: '{"operationType": "purchase", "status": "succeeded", "resourceLocation": + null, "createdDateTime": "2022-08-16T10:11:12.497644+00:00", "id": "purchase_84d84d57-9b8e-4dd9-84b2-621333c64b98", + "lastActionDateTime": "0001-01-01T00:00:00+00:00"}' + headers: + api-supported-versions: + - 2021-03-07, 2022-01-11-preview2, 2022-06-01-preview, 2022-12-01 + connection: + - keep-alive + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 10:12:17 GMT + ms-cv: + - l+FK7BMFq0abu44HA6qHOQ.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 20220816T101217Z-zvdmwacghh4c97ggppewnyshxn00000000gg00000000c7hw + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 366ms + status: + code: 200 + message: OK + url: sanitized +- request: + body: '{"from": "sanitized", "smsRecipients": [{"to": "sanitized", "repeatabilityRequestId": + "sanitized", "repeatabilityFirstSent": "sanitized"}, {"to": "sanitized", "repeatabilityRequestId": + "sanitized", "repeatabilityFirstSent": "sanitized"}], "message": "Hello there!!", + "smsSendOptions": {"enableDeliveryReport": false}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '317' + Content-Type: + - application/json + Date: + - Tue, 16 Aug 2022 10:12:16 GMT + User-Agent: + - azsdk-python-communication-sms/1.0.1 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - 9/wzPp6cxxrhUJVMYMGwAO1kdz5PfJcP6roS2iAQFIA= + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/sms?api-version=2021-03-07 + response: + body: + string: '{"value": [{"to": "sanitized", "messageId": "sanitized", "httpStatusCode": + 202, "repeatabilityResult": "accepted", "successful": true}, {"to": "sanitized", + "messageId": "sanitized", "httpStatusCode": 202, "repeatabilityResult": "accepted", + "successful": true}]}' + headers: + api-supported-versions: + - 2020-07-20-preview1, 2020-08-20-preview, 2021-03-07 + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 10:12:17 GMT + ms-cv: + - TExI0kkKJkOjMS8YQaESMA.0 + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-azure-ref: + - 0gW37YgAAAAAhEPZscVSVQ5JXmrqPNSQZWVZSMzExMDAwMTE1MDE5ADlmYzdiNTE5LWE4Y2MtNGY4OS05MzVlLWM5MTQ4YWUwOWU4MQ== + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 256ms + status: + code: 202 + message: Accepted + url: sanitized +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_token_issue.yaml b/src/communication/azext_communication/tests/latest/recordings/test_token_issue.yaml new file mode 100644 index 00000000000..a6bd9bfdf33 --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_token_issue.yaml @@ -0,0 +1,56 @@ +interactions: +- request: + body: '{"createTokenWithScopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '35' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - kWpGozyV35fifbpKdY8mbdG64VG0Pdq5upzo7YKAFM0= + x-ms-date: + - Tue, 16 Aug 2022 10:01:23 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", + "expiresOn": "2022-08-17T10:01:25.3044501+00:00"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + connection: + - keep-alive + content-length: + - '122' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 10:01:25 GMT + ms-cv: + - YjsM5gX7pEu/kncGh7p4Zw.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T100125Z-zvdmwacghh4c97ggppewnyshxn00000000e000000003rucp + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 134ms + status: + code: 201 + message: Created +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_token_issue_with_id.yaml b/src/communication/azext_communication/tests/latest/recordings/test_token_issue_with_id.yaml new file mode 100644 index 00000000000..adae30416c8 --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_token_issue_with_id.yaml @@ -0,0 +1,110 @@ +interactions: +- request: + body: '{}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - RBNvo1WzZ4oRRq0W9+hknpT7T8If536DEMBg9hyq/4o= + x-ms-date: + - Tue, 16 Aug 2022 10:01:23 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + connection: + - keep-alive + content-length: + - '33' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 10:01:25 GMT + ms-cv: + - DtQjJTOjm0iKVzzVzvuf5w.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T100125Z-vucxhh51rx5mv27fvss3h7q1kc00000000f000000000382h + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 119ms + status: + code: 201 + message: Created +- request: + body: '{"scopes": ["chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '20' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - sZHRO4JkAmw3HcI1PyxrC5twHvkHIWjyMLVIkauXKRA= + x-ms-date: + - Tue, 16 Aug 2022 10:01:24 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2022-06-01 + response: + body: + string: '{"token": "sanitized", "expiresOn": "2022-08-17T10:01:26.4548108+00:00"}' + headers: + accept-ranges: + - bytes + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + connection: + - keep-alive + content-length: + - '72' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 10:01:26 GMT + ms-cv: + - pE/7U/HMYUWGgOzEfInuHg.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T100126Z-p18hf8s3dx4xf8cgexx53pe93400000000dg000000009gxw + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 186ms + status: + code: 200 + message: OK +version: 1 diff --git a/src/communication/azext_communication/tests/latest/recordings/test_token_issue_with_multiple_scopes.yaml b/src/communication/azext_communication/tests/latest/recordings/test_token_issue_with_multiple_scopes.yaml new file mode 100644 index 00000000000..5acf3de9fd7 --- /dev/null +++ b/src/communication/azext_communication/tests/latest/recordings/test_token_issue_with_multiple_scopes.yaml @@ -0,0 +1,56 @@ +interactions: +- request: + body: '{"createTokenWithScopes": ["voip", "chat"]}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '43' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0 Python/3.8.10 (Windows-10-10.0.19044-SP0) + x-ms-content-sha256: + - hlYiA5kT1yt3LwEdaupQDHzQEfodx+8svsStB5uolgw= + x-ms-date: + - Tue, 16 Aug 2022 10:01:24 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/identities?api-version=2022-06-01 + response: + body: + string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", + "expiresOn": "2022-08-17T10:01:26.9368041+00:00"}}' + headers: + api-supported-versions: + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-10-31-preview, + 2021-11-01, 2022-06-01 + connection: + - keep-alive + content-length: + - '122' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 16 Aug 2022 10:01:27 GMT + ms-cv: + - mruKWtOrG0S3Q7K9i7u5Xg.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-azure-ref: + - 20220816T100126Z-r0s9pbvvdt0w72q6sqrkc1ktpw00000005f000000002ngv0 + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 123ms + status: + code: 201 + message: Created +version: 1 diff --git a/src/communication/azext_communication/tests/latest/test_communication_chat_scenario.py b/src/communication/azext_communication/tests/latest/test_communication_chat_scenario.py new file mode 100644 index 00000000000..509a67f9f0a --- /dev/null +++ b/src/communication/azext_communication/tests/latest/test_communication_chat_scenario.py @@ -0,0 +1,556 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +from azure.cli.testsdk import ScenarioTest, ResourceGroupPreparer +import os +from .recording_processors import URIIdentityReplacer, BodyReplacerProcessor +from .preparers import CommunicationResourcePreparer + +class CommunicationChatScenarios(ScenarioTest): + + def __init__(self, method_name): + super().__init__(method_name, recording_processors=[ + URIIdentityReplacer(), + BodyReplacerProcessor(keys=["id", "token", "rawId"]), + ]) + + + def __create_thread(self, topic): + self.kwargs.update({ + 'topic': topic }) + return self.cmd('az communication chat thread create --topic \"{topic}\"').get_output_in_json() + + + def __create_user(self, communication_resource_info): + connection_str = communication_resource_info[1] + if self.is_live or self.in_recording: + self.kwargs.update({ 'connection_string': connection_str}) + else: + os.environ['AZURE_COMMUNICATION_CONNECTION_STRING'] = connection_str + res = self.cmd('az communication identity token issue --scope chat').get_output_in_json() + return res['user_id'] + + + def __get_endpoint_from_resource_info(self, communication_resource_info): + return communication_resource_info[2] + + def __get_or_create_token(self, communication_resource_info): + if self.is_live or self.in_recording: + os.environ['AZURE_COMMUNICATION_CONNECTION_STRING'] = communication_resource_info[1] + self.kwargs.update({ 'connection_string': communication_resource_info[1] }) + res = self.cmd('az communication identity token issue --scope chat').get_output_in_json() + return res['token'] + else: + # header is encoded form of + # {"alg":"sanitized","kid":"1","x5t":"sanitized","typ":"sanitized"} + header = 'eyJhbGciOiJzYW5pdGl6ZWQiLCJraWQiOiIxIiwieDV0Ijoic2FuaXRpemVkIiwidHlwIjoic2FuaXRpemVkIn0=' + + # payload is encoded form of + # {"skypeid":"acs:sanitized","scp":1792,"csi":"1657788332","exp":1657874732,"acsScope":"chat","resourceId":"sanitized","iat":1657788332} + payload = 'eyJza3lwZWlkIjoiYWNzOnNhbml0aXplZCIsInNjcCI6MTc5MiwiY3NpIjoiMTY1Nzc4ODMzMiIsImV4cCI6MTY1Nzg3NDczMiwiYWNzU2NvcGUiOiJjaGF0IiwicmVzb3VyY2VJZCI6InNhbml0aXplZCIsImlhdCI6MTY1Nzc4ODMzMn0=' + + signature = '1234' + + return '{header}.{payload}.{signature}'.format(header=header, payload=payload, signature=signature) + + + def __update_environ(self, communication_resource_info): + endpoint = self.__get_endpoint_from_resource_info(communication_resource_info) + os.environ['AZURE_COMMUNICATION_ENDPOINT'] = endpoint + + token = self.__get_or_create_token(communication_resource_info) + os.environ['AZURE_COMMUNICATION_ACCESS_TOKEN'] = token + + return endpoint, token + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_chat_list_threads_with_env_auth(self, communication_resource_info): + self.__update_environ(communication_resource_info) + threads = self.cmd('az communication chat thread list').get_output_in_json() + assert len(threads) == 0 + + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_chat_list_threads_with_cmdline_auth(self, communication_resource_info): + endpoint, token = self.__update_environ(communication_resource_info) + self.kwargs.update({ + 'access_token': token, + 'endpoint': endpoint }) + threads = self.cmd('az communication chat thread list --endpoint \"{endpoint}\" --access-token \"{access_token}\"').get_output_in_json() + assert len(threads) == 0 + + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_chat_list_threads_no_endpoint(self, communication_resource_info): + from azure.cli.core.azclierror import RequiredArgumentMissingError + + token = self.__get_or_create_token(communication_resource_info) + os.environ['AZURE_COMMUNICATION_ACCESS_TOKEN'] = token + + self.kwargs.pop('endpoint', None) + os.environ.pop('AZURE_COMMUNICATION_ENDPOINT', None) + + with self.assertRaises(RequiredArgumentMissingError) as raises: + self.cmd('az communication chat thread list').get_output_in_json() + + assert '--endpoint' in str(raises.exception) + assert 'AZURE_COMMUNICATION_ENDPOINT' in str(raises.exception) + + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_chat_create_thread(self, communication_resource_info): + self.__update_environ(communication_resource_info) + + chat_topic = 'some-topic' + self.kwargs.update({ + 'topic': chat_topic }) + self.cmd('az communication chat thread create --topic \"{topic}\"', checks = [ + self.check("errors", None), + self.check("chatThread.topic", chat_topic), + ]) + + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_chat_create_thread_without_topic(self, communication_resource_info): + self.__update_environ(communication_resource_info) + + with self.assertRaises(SystemExit) as raises: + self.cmd('az communication chat thread create').get_output_in_json() + assert raises.exception.code == 2 + + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_chat_delete_thread(self, communication_resource_info): + self.__update_environ(communication_resource_info) + + chat_topic = 'some-topic' + self.kwargs.update({ + 'topic': chat_topic }) + res = self.__create_thread(chat_topic) + thread_id = res['chatThread']['id'] + + self.kwargs.update({ 'thread_id': thread_id }) + self.cmd('az communication chat thread delete --thread {thread_id}') + + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_chat_list_participants(self, communication_resource_info): + self.__update_environ(communication_resource_info) + + chat_topic = 'some-topic' + self.kwargs.update({ + 'topic': chat_topic }) + thread = self.cmd('az communication chat thread create --topic \"{topic}\"').get_output_in_json() + thread_id = thread['chatThread']['id'] + self.kwargs.update({ + 'thread_id': thread_id }) + participants = self.cmd('az communication chat participant list --thread {thread_id}').get_output_in_json() + assert len(participants) == 1 + assert participants[0]['shareHistoryTime'] == '1970-01-01T00:00:00+00:00' + + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_chat_list_participants_bad_thread_id(self, communication_resource_info): + from azure.core.exceptions import HttpResponseError + + self.__update_environ(communication_resource_info) + + thread_id = 'sanitized' + self.kwargs.update({ + 'thread_id': thread_id }) + with self.assertRaises(HttpResponseError) as raises: + self.cmd('az communication chat participant list --thread {thread_id}', checks = [ + self.check('httpStatusCode', '400')]) + + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_chat_add_participant(self, communication_resource_info): + endpoint, token = self.__update_environ(communication_resource_info) + + user_id = self.__create_user(communication_resource_info) + + # create a new thread + self.kwargs.update({ + 'topic': "chat-topic" }) + + thread = self.cmd('az communication chat thread create --topic \"{topic}\"').get_output_in_json() + thread_id = thread['chatThread']['id'] + + # add the new user to the chat thread + self.kwargs.update({ + 'thread_id': thread_id, + 'user_id': user_id, + 'access_token': token }) + + add_res = self.cmd('az communication chat participant add --thread {thread_id} --user {user_id}').get_output_in_json() + + assert len(add_res) == 0 + + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_chat_add_participant_bad_user(self, communication_resource_info): + endpoint, token = self.__update_environ(communication_resource_info) + + # create a new thread + self.kwargs.update({ + 'topic': "chat-topic" }) + thread = self.cmd('az communication chat thread create --topic \"{topic}\"').get_output_in_json() + thread_id = thread['chatThread']['id'] + + # add a fake user to the chat thread + user_id = '8:acs:00000000-1111-2222-3333-444444444444_55555555-6666-7777-8888-999999999999' + self.kwargs.update({ + 'thread_id': thread_id, + 'user_id': user_id, + 'access_token': token }) + + add_res = self.cmd('az communication chat participant add --thread {thread_id} --user {user_id}', checks = [ + self.check('[0].code', '403'), + self.check('[0].message', 'Permissions check failed'), + self.check('[0].target', user_id) ]).get_output_in_json() + + assert len(add_res) == 1 + + # add invalid user id to the chat thread + self.kwargs.update({ + 'user_id': '8:acs:fakeid===' }) + + with self.assertRaises(Exception) as raises: + self.cmd('az communication chat participant add --thread {thread_id} --user {user_id}', checks = [ + self.check('CommunicationError.code', 'Bad Request')]) + + assert 'Identifier format is invalid' in str(raises.exception) + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_chat_remove_participants(self, communication_resource_info): + from azure.core.exceptions import HttpResponseError + + self.__update_environ(communication_resource_info) + + user_id = self.__create_user(communication_resource_info) + + # create a new thread + thread = self.__create_thread('chat-topic') + thread_id = thread['chatThread']['id'] + owner_id = thread['chatThread']['createdBy']['properties']['id'] + + # add the new user to the chat thread + self.kwargs.update({ + 'thread_id': thread_id, + 'user_id': user_id }) + + add_res = self.cmd('az communication chat participant add --thread {thread_id} --user {user_id}').get_output_in_json() + assert len(add_res) == 0 + + # remove the new user from the chat thread + self.cmd('az communication chat participant remove --thread {thread_id} --user {user_id}') + + # try to remove a user with invalid id + self.kwargs.update({ + 'user_id': '8:acs:fakeid' }) + + with self.assertRaises(HttpResponseError) as raises: + self.cmd('az communication chat participant remove --thread {thread_id} --user {user_id}', checks = [ + self.check('CommunicationError.code', 'Bad Request')]) + + assert 'Identifier format is invalid' in str(raises.exception) + + # remove the original user from the chat thread + self.kwargs.update({ + 'user_id': owner_id }) + self.cmd('az communication chat participant remove --thread {thread_id} --user {user_id}') + + # try to remove the original user again, should raise an error + with self.assertRaises(HttpResponseError) as raises: + self.cmd('az communication chat participant remove --thread {thread_id} --user {user_id}') + + assert 'The initiator doesn\'t have the permission to perform the requested operation.' in str(raises.exception) + + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_chat_add_participant_with_display_name(self, communication_resource_info): + self.__update_environ(communication_resource_info) + + # create a new thread + thread = self.__create_thread('chat-topic') + thread_id = thread['chatThread']['id'] + + user_id = self.__create_user(communication_resource_info) + + # add the new user to the chat thread + display_name = '\"John Doe\"' + self.kwargs.update({ + 'thread_id': thread_id, + 'user_id': user_id, + 'display_name': display_name }) + add_res = self.cmd('az communication chat participant add --thread {thread_id} --user {user_id} --display-name {display_name}').get_output_in_json() + assert len(add_res) == 0 + + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_chat_add_participant_with_history_time(self, communication_resource_info): + self.__update_environ(communication_resource_info) + + # create a new thread + thread = self.__create_thread('chat-topic') + thread_id = thread['chatThread']['id'] + + user_id = self.__create_user(communication_resource_info) + + # add the new user to the chat thread + start_time = '2022-01-01T00:00:00' + self.kwargs.update({ + 'thread_id': thread_id, + 'user_id': user_id, + 'start_time': start_time}) + add_res = self.cmd('az communication chat participant add --thread {thread_id} --user {user_id} --start-time {start_time}').get_output_in_json() + assert len(add_res) == 0 + + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_chat_list_messages(self, communication_resource_info): + self.__update_environ(communication_resource_info) + + # create a new thread first + thread = self.__create_thread('another-topic') + thread_id = thread['chatThread']['id'] + + self.kwargs.update({ + 'thread_id': thread_id }) + messages = self.cmd('az communication chat message list --thread {thread_id}').get_output_in_json() + assert len(messages) > 0 + + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_chat_list_messages(self, communication_resource_info): + self.__update_environ(communication_resource_info) + + # create a new thread first + thread = self.__create_thread('another-topic') + thread_id = thread['chatThread']['id'] + + start_time = '2022-01-01T00:00:00' + self.kwargs.update({ + 'thread_id': thread_id, + 'start_time': start_time }) + messages = self.cmd('az communication chat message list --thread {thread_id} --start-time {start_time}').get_output_in_json() + assert len(messages) > 0 + + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_chat_send_message(self, communication_resource_info): + self.__update_environ(communication_resource_info) + + # create a new thread first + thread = self.__create_thread('some-other-topic') + thread_id = thread['chatThread']['id'] + + content = '\"Hello!\"' + self.kwargs.update({ + 'thread_id': thread_id, + 'content': content }) + message = self.cmd('az communication chat message send --thread {thread_id} --content {content}').get_output_in_json() + assert message['id'] is not None + + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_chat_send_message_without_content(self, communication_resource_info): + self.__update_environ(communication_resource_info) + + # create a new thread first + thread = self.__create_thread('yet-another-topic') + thread_id = thread['chatThread']['id'] + + self.kwargs.update({ + 'thread_id': thread_id }) + with self.assertRaises(SystemExit) as raises: + self.cmd('az communication chat message send --thread {thread_id}').get_output_in_json() + assert raises.exception.code == 2 + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_chat_send_text_message(self, communication_resource_info): + self.__update_environ(communication_resource_info) + + # create a new thread first + thread = self.__create_thread('yet-another-topic') + thread_id = thread['chatThread']['id'] + + content = '\"Hello!\"' + self.kwargs.update({ + 'thread_id': thread_id, + 'content': content }) + message = self.cmd('az communication chat message send --thread {thread_id} --content {content} --message-type text').get_output_in_json() + assert message['id'] is not None + + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_chat_send_html_message(self, communication_resource_info): + self.__update_environ(communication_resource_info) + + # create a new thread first + thread = self.__create_thread('yet-another-topic') + thread_id = thread['chatThread']['id'] + + content = '
hello!
' + self.kwargs.update({ + 'thread_id': thread_id, + 'content': content }) + message = self.cmd('az communication chat message send --thread {thread_id} --content {content} --message-type html').get_output_in_json() + assert message['id'] is not None + + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_chat_get_message(self, communication_resource_info): + self.__update_environ(communication_resource_info) + + # create a new thread first + thread = self.__create_thread('new-topic') + thread_id = thread['chatThread']['id'] + + content = 'hello!' + self.kwargs.update({ + 'thread_id': thread_id, + 'content': content }) + sent_message = self.cmd('az communication chat message send --thread {thread_id} --content {content} --message-type html').get_output_in_json() + + self.kwargs.update({ + 'message_id': sent_message['id'] }) + message = self.cmd('az communication chat message get --thread {thread_id} --message-id {message_id}').get_output_in_json() + assert message['content']['message'] == content + + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_chat_update_message(self, communication_resource_info): + self.__update_environ(communication_resource_info) + + # create a new thread first + thread = self.__create_thread('some-other-topic') + thread_id = thread['chatThread']['id'] + + # then send a message to the thread + content = '\"Hello!\"' + self.kwargs.update({ + 'thread_id': thread_id, + 'content': content }) + message = self.cmd('az communication chat message send --thread {thread_id} --content {content}').get_output_in_json() + + # and update it + new_content = '\"Hello there!\"' + self.kwargs.update({ + 'content': new_content, + 'message_id': message['id'] }) + self.cmd('az communication chat message update --thread {thread_id} --message-id {message_id} --content {content}') + + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_chat_delete_message(self, communication_resource_info): + self.__update_environ(communication_resource_info) + + # create a new thread first + thread = self.__create_thread('some-other-topic') + thread_id = thread['chatThread']['id'] + + # then send a message to the thread + content = '\"Hello!\"' + self.kwargs.update({ + 'thread_id': thread_id, + 'content': content }) + message = self.cmd('az communication chat message send --thread {thread_id} --content {content}').get_output_in_json() + + # and delete it + self.kwargs.update({ + 'message_id': message['id'] }) + self.cmd('az communication chat message delete --thread {thread_id} --message-id {message_id}') + + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_chat_update_message(self, communication_resource_info): + self.__update_environ(communication_resource_info) + + # create a new thread first + thread = self.__create_thread('thread-topic') + thread_id = thread['chatThread']['id'] + + # then send a message to the thread + content = '\"Hello!\"' + self.kwargs.update({ + 'thread_id': thread_id, + 'content': content }) + message = self.cmd('az communication chat message send --thread {thread_id} --content {content}').get_output_in_json() + + new_content = '\"Hello there!\"' + self.kwargs.update({ + 'content': new_content, + 'message_id': message['id'] }) + self.cmd('az communication chat message update --thread {thread_id} --message-id {message_id} --content {content}') + + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_chat_update_topic(self, communication_resource_info): + self.__update_environ(communication_resource_info) + + # create a new thread first + thread = self.__create_thread('thread-topic') + thread_id = thread['chatThread']['id'] + + # then update the topic + new_topic = '\"new-topic!\"' + self.kwargs.update({ + 'thread_id': thread_id, + 'topic': new_topic }) + self.cmd('az communication chat thread update-topic --thread {thread_id} --topic {topic}') + + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_chat_read_receipts(self, communication_resource_info): + self.__update_environ(communication_resource_info) + + # create a new thread first + thread = self.__create_thread('thread-topic') + thread_id = thread['chatThread']['id'] + + self.kwargs.update({ + 'thread_id': thread_id }) + receipts = self.cmd('az communication chat message receipt list --thread {thread_id}').get_output_in_json() + assert len(receipts) == 0 + + messages = self.cmd('az communication chat message list --thread {thread_id}').get_output_in_json() + message_id = messages[0]['id'] + + self.kwargs.update({ + 'message_id': message_id }) + self.cmd('az communication chat message receipt send --thread {thread_id} --message-id {message_id}') + + receipts = self.cmd('az communication chat message receipt list --thread {thread_id}').get_output_in_json() + assert len(receipts) == 1 + + + diff --git a/src/communication/azext_communication/tests/latest/test_communication_identity_scenario.py b/src/communication/azext_communication/tests/latest/test_communication_identity_scenario.py index 3c5649ab9f1..38c4b811029 100644 --- a/src/communication/azext_communication/tests/latest/test_communication_identity_scenario.py +++ b/src/communication/azext_communication/tests/latest/test_communication_identity_scenario.py @@ -23,10 +23,29 @@ def __init__(self, method_name): BodyReplacerProcessor(keys=["id", "token"]) ]) + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') @CommunicationResourcePreparer(resource_group_parameter_name='rg') - def test_issue_access_token(self, communication_resource_info): + def test_create_user(self, communication_resource_info): + os.environ['AZURE_COMMUNICATION_CONNECTION_STRING'] = communication_resource_info[1] + res = self.cmd('az communication identity user create').get_output_in_json() + assert res is not None + assert res['properties']['id'] == res['rawId'] + + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_delete_user(self, communication_resource_info): + os.environ['AZURE_COMMUNICATION_CONNECTION_STRING'] = communication_resource_info[1] + res = self.cmd('az communication identity user create').get_output_in_json() + user_id = res['properties']['id'] + + self.kwargs.update({ 'user_id': user_id }) + self.cmd('az communication identity user delete --user {user_id}') + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_issue_access_token(self, communication_resource_info): os.environ['AZURE_COMMUNICATION_CONNECTION_STRING'] = communication_resource_info[1] val = self.cmd( @@ -36,7 +55,7 @@ def test_issue_access_token(self, communication_resource_info): @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') @CommunicationResourcePreparer(resource_group_parameter_name='rg') def test_issue_access_token_with_id(self, communication_resource_info): - + os.environ['AZURE_COMMUNICATION_CONNECTION_STRING'] = communication_resource_info[1] id = get_test_identity_id(self.is_live, self.in_recording, communication_resource_info[1]) @@ -46,12 +65,54 @@ def test_issue_access_token_with_id(self, communication_resource_info): 'az communication identity issue-access-token --scope chat --userid {id}').get_output_in_json() self.assertIsNotNone(val['token']) + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') @CommunicationResourcePreparer(resource_group_parameter_name='rg') def test_issue_access_token_with_multiple_scopes(self, communication_resource_info): - os.environ['AZURE_COMMUNICATION_CONNECTION_STRING'] = communication_resource_info[1] val = self.cmd( 'az communication identity issue-access-token --scope voip chat').get_output_in_json() - self.assertIsNotNone(val['token']) \ No newline at end of file + self.assertIsNotNone(val['token']) + + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_token_issue(self, communication_resource_info): + os.environ['AZURE_COMMUNICATION_CONNECTION_STRING'] = communication_resource_info[1] + + val = self.cmd( + 'az communication identity token issue --scope chat').get_output_in_json() + self.assertIsNotNone(val['token']) + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_token_issue_with_id(self, communication_resource_info): + + os.environ['AZURE_COMMUNICATION_CONNECTION_STRING'] = communication_resource_info[1] + + id = get_test_identity_id(self.is_live, self.in_recording, communication_resource_info[1]) + self.kwargs.update({'id': id}) + + val = self.cmd( + 'az communication identity token issue --scope chat --user {id}').get_output_in_json() + self.assertIsNotNone(val['token']) + + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_token_issue_with_multiple_scopes(self, communication_resource_info): + os.environ['AZURE_COMMUNICATION_CONNECTION_STRING'] = communication_resource_info[1] + + val = self.cmd( + 'az communication identity token issue --scope voip chat').get_output_in_json() + self.assertIsNotNone(val['token']) + + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_revoke_access_tokens(self, communication_resource_info): + os.environ['AZURE_COMMUNICATION_CONNECTION_STRING'] = communication_resource_info[1] + id = get_test_identity_id(self.is_live, self.in_recording, communication_resource_info[1]) + self.kwargs.update({'id': id}) + self.cmd('az communication identity token revoke --user {id}') diff --git a/src/communication/azext_communication/tests/latest/test_communication_phonenumber_scenario.py b/src/communication/azext_communication/tests/latest/test_communication_phonenumber_scenario.py index 83159e7a019..8bcfd6fd0e2 100644 --- a/src/communication/azext_communication/tests/latest/test_communication_phonenumber_scenario.py +++ b/src/communication/azext_communication/tests/latest/test_communication_phonenumber_scenario.py @@ -53,3 +53,33 @@ def test_show_phonenumbers(self, communication_resource_info): self.assertIsNotNone(phonenumber_info['capabilities']) self.assertIsNotNone(phonenumber_info['cost']) self.check(phonenumber_info['phoneNumber'], phonenumber) + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_phonenumber_list(self, communication_resource_info): + if self.is_live or self.in_recording: + get_new_phonenumber(communication_resource_info[1]) + + os.environ['AZURE_COMMUNICATION_CONNECTION_STRING'] = communication_resource_info[1] + + phonenumber_list = self.cmd( + 'az communication phonenumber list').get_output_in_json() + assert len(phonenumber_list) > 0 + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_phonenumber_show(self, communication_resource_info): + phonenumber = get_test_source_phonenumber(self.is_live, self.in_recording) + if phonenumber is None: + phonenumber = get_new_phonenumber(communication_resource_info[1]) + + self.kwargs.update({'phonenumber': phonenumber}) + os.environ['AZURE_COMMUNICATION_CONNECTION_STRING'] = communication_resource_info[1] + + phonenumber_info = self.cmd( + 'az communication phonenumber show --phonenumber \"{phonenumber}\"').get_output_in_json() + self.assertIsNotNone(phonenumber_info['id']) + self.assertIsNotNone(phonenumber_info['assignmentType']) + self.assertIsNotNone(phonenumber_info['capabilities']) + self.assertIsNotNone(phonenumber_info['cost']) + self.check(phonenumber_info['phoneNumber'], phonenumber) diff --git a/src/communication/azext_communication/tests/latest/test_communication_scenario.py b/src/communication/azext_communication/tests/latest/test_communication_scenario.py index 4f9661e2a60..bd405c8b012 100644 --- a/src/communication/azext_communication/tests/latest/test_communication_scenario.py +++ b/src/communication/azext_communication/tests/latest/test_communication_scenario.py @@ -21,13 +21,13 @@ from .example_steps import step_list_key from .example_steps import step_regenerate_key from .example_steps import step_delete +from .recording_processors import BodyReplacerProcessor from .. import ( try_manual, raise_if, calc_coverage ) - TEST_DIR = os.path.abspath(os.path.join(os.path.abspath(__file__), '..')) @@ -60,6 +60,9 @@ def call_scenario(test, rg_2, rg): step_list(test, rg_2, rg, checks=[ test.check('length(@)', 1), ]) + step_list2(test, rg_2, rg, checks=[ + test.check('length(@)', 1), + ]) step_update(test, rg_2, rg, checks=[ test.check("name", "{myCommunicationService}", case_sensitive=False), test.check("location", "Global", case_sensitive=False), @@ -78,7 +81,7 @@ def call_scenario(test, rg_2, rg): class CommunicationScenarioTest(ScenarioTest): def __init__(self, *args, **kwargs): - super(CommunicationScenarioTest, self).__init__(*args, **kwargs) + super(CommunicationScenarioTest, self).__init__(recording_processors=[], *args, **kwargs) self.kwargs.update({ 'subscription_id': self.get_subscription_id() }) @@ -92,7 +95,7 @@ def __init__(self, *args, **kwargs): @ResourceGroupPreparer(name_prefix='clitestcommunication_MyOtherResourceGroup'[:7], key='rg_2', parameter_name='rg_2') @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') - def test_communication_Scenario(self, rg_2, rg): + def test_communication_scenario(self, rg_2, rg): call_scenario(self, rg_2, rg) calc_coverage(__file__) raise_if() diff --git a/src/communication/azext_communication/tests/latest/test_communication_scenario_coverage.md b/src/communication/azext_communication/tests/latest/test_communication_scenario_coverage.md index 010115e5b32..2250575a329 100644 --- a/src/communication/azext_communication/tests/latest/test_communication_scenario_coverage.md +++ b/src/communication/azext_communication/tests/latest/test_communication_scenario_coverage.md @@ -1,10 +1,11 @@ |Scenario|Result|ErrorMessage|ErrorStack|ErrorNormalized|StartDt|EndDt| -|step_create|successed||||2022-06-14 20:22:12.670095|2022-06-14 20:22:13.070010| -|step_show|successed||||2022-06-14 20:22:13.070010|2022-06-14 20:22:13.220678| -|step_list|successed||||2022-06-14 20:22:13.220678|2022-06-14 20:22:13.369475| -|step_update|successed||||2022-06-14 20:22:13.369475|2022-06-14 20:22:13.486456| -|step_link_notification_hub|successed||||2022-06-14 20:22:13.486456|2022-06-14 20:22:13.603087| -|step_list_key|successed||||2022-06-14 20:22:13.603087|2022-06-14 20:22:13.734181| -|step_regenerate_key|successed||||2022-06-14 20:22:13.734181|2022-06-14 20:22:13.847652| -|step_delete|successed||||2022-06-14 20:22:13.847652|2022-06-14 20:22:14.507921| -Coverage: 8/8 +|step_create|successed||||2022-08-16 10:12:46.739443|2022-08-16 10:12:47.297604| +|step_show|successed||||2022-08-16 10:12:47.297604|2022-08-16 10:12:47.376135| +|step_list|successed||||2022-08-16 10:12:47.376135|2022-08-16 10:12:47.449941| +|step_list2|successed||||2022-08-16 10:12:47.449941|2022-08-16 10:12:47.523425| +|step_update|successed||||2022-08-16 10:12:47.524424|2022-08-16 10:12:47.614416| +|step_link_notification_hub|successed||||2022-08-16 10:12:47.615416|2022-08-16 10:12:47.684154| +|step_list_key|successed||||2022-08-16 10:12:47.684154|2022-08-16 10:12:47.754154| +|step_regenerate_key|successed||||2022-08-16 10:12:47.754154|2022-08-16 10:12:47.823157| +|step_delete|successed||||2022-08-16 10:12:47.823157|2022-08-16 10:12:48.083435| +Coverage: 9/9 diff --git a/src/communication/azext_communication/tests/latest/test_communication_sms_scenarios.py b/src/communication/azext_communication/tests/latest/test_communication_sms_scenarios.py index c68ad6d5701..b3694c1ca49 100644 --- a/src/communication/azext_communication/tests/latest/test_communication_sms_scenarios.py +++ b/src/communication/azext_communication/tests/latest/test_communication_sms_scenarios.py @@ -79,3 +79,60 @@ def test_send_sms_n_recipients(self, communication_resource_info): self.check("[0].httpStatusCode", "202"), self.check("[0].successful", "True") ]) + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_sms_send(self, communication_resource_info): + + os.environ['AZURE_COMMUNICATION_CONNECTION_STRING'] = communication_resource_info[1] + + sender = get_test_source_phonenumber(self.is_live, self.in_recording) + recipient = get_test_recipient_phonenumber(self.is_live, self.in_recording) + + if sender is None: + sender = get_new_phonenumber(communication_resource_info[1]) + + if recipient is None: + recipient = sender + + self.kwargs.update({ + 'sender': sender, + 'recipient': recipient}) + + self.cmd('az communication sms send --sender \"{sender}\" \ + --recipient \"{recipient}\" --message "Hello there!!"', checks=[ + self.check("[0].errorMessage", None), + self.check("[0].httpStatusCode", "202"), + self.check("[0].successful", "True") + ]) + + @ResourceGroupPreparer(name_prefix='clitestcommunication_MyResourceGroup'[:7], key='rg', parameter_name='rg') + @CommunicationResourcePreparer(resource_group_parameter_name='rg') + def test_sms_send_n_recipients(self, communication_resource_info): + + os.environ['AZURE_COMMUNICATION_CONNECTION_STRING'] = communication_resource_info[1] + + sender = get_test_source_phonenumber(self.is_live, self.in_recording) + recipient1 = get_test_recipient_phonenumber(self.is_live, self.in_recording) + recipient2 = get_test_recipient_phonenumber(self.is_live, self.in_recording) + + if sender is None: + sender = get_new_phonenumber(communication_resource_info[1]) + + if recipient1 is None: + recipient1 = get_new_phonenumber(communication_resource_info[1]) + + if recipient2 is None: + recipient2 = get_new_phonenumber(communication_resource_info[1]) + + self.kwargs.update({ + 'sender': sender, + 'recipient1': recipient1, + 'recipient2': recipient2}) + + self.cmd('az communication sms send --sender \"{sender}\" \ + --recipient \"{recipient1}\" \"{recipient2}\" --message "Hello there!!"', checks=[ + self.check("[0].errorMessage", None), + self.check("[0].httpStatusCode", "202"), + self.check("[0].successful", "True") + ]) diff --git a/src/communication/setup.py b/src/communication/setup.py index b58174c0e5e..42523aca151 100644 --- a/src/communication/setup.py +++ b/src/communication/setup.py @@ -10,7 +10,7 @@ from setuptools import setup, find_packages # HISTORY.rst entry. -VERSION = '1.1.2' +VERSION = '1.2.0' try: from azext_communication.manual.version import VERSION except ImportError: @@ -24,14 +24,14 @@ 'Intended Audience :: System Administrators', 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'License :: OSI Approved :: MIT License', ] -DEPENDENCIES = ['azure-core', 'azure-communication-identity', - 'azure-communication-phonenumbers', 'azure-communication-sms'] +DEPENDENCIES = ['azure-core', 'azure-communication-identity>=1.1.0', + 'azure-communication-phonenumbers', 'azure-communication-sms', + 'azure-communication-chat'] try: from azext_communication.manual.dependency import DEPENDENCIES @@ -54,6 +54,7 @@ license='MIT', classifiers=CLASSIFIERS, packages=find_packages(), + python_requires='>=3.7', install_requires=DEPENDENCIES, package_data={'azext_communication': ['azext_metadata.json']}, )