Amazon Chime examples using Amazon CLI - Amazon Command Line Interface
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Amazon Chime examples using Amazon CLI

The following code examples show you how to perform actions and implement common scenarios by using the Amazon Command Line Interface with Amazon Chime.

Actions are code excerpts from larger programs and must be run in context. While actions show you how to call individual service functions, you can see actions in context in their related scenarios and cross-service examples.

Scenarios are code examples that show you how to accomplish a specific task by calling multiple functions within the same service.

Each example includes a link to GitHub, where you can find instructions on how to set up and run the code in context.

Topics

Actions

The following code example shows how to use associate-phone-number-with-user.

Amazon CLI

To associate a phone number with a user

The following associate-phone-number-with-user example associates the specified phone number with a user.

aws chime associate-phone-number-with-user \ --account-id 12a3456b-7c89-012d-3456-78901e23fg45 \ --user-id 1ab2345c-67de-8901-f23g-45h678901j2k \ --e164-phone-number "+12065550100"

This command produces no output.

For more information, see Managing User Phone Numbers in the Amazon Chime Administration Guide.

The following code example shows how to use associate-phone-numbers-with-voice-connector-group.

Amazon CLI

To associate phone numbers with an Amazon Chime Voice Connector group

The following associate-phone-numbers-with-voice-connector-group example associates the specified phone numbers with an Amazon Chime Voice Connector group.

aws chime associate-phone-numbers-with-voice-connector-group \ --voice-connector-group-id 123a456b-c7d8-90e1-fg23-4h567jkl8901 \ --e164-phone-numbers "+12065550100" "+12065550101" \ --force-associate

Output:

{ "PhoneNumberErrors": [] }

For more information, see Working with Amazon Chime Voice Connector groups in the Amazon Chime Administration Guide.

The following code example shows how to use associate-phone-numbers-with-voice-connector.

Amazon CLI

To associate phone numbers with an Amazon Chime Voice Connector

The following associate-phone-numbers-with-voice-connector example associates the specified phone numbers with an Amazon Chime Voice Connector.

aws chime associate-phone-numbers-with-voice-connector \ --voice-connector-id abcdef1ghij2klmno3pqr4 \ --e164-phone-numbers "+12065550100" "+12065550101" --force-associate

Output:

{ "PhoneNumberErrors": [] }

For more information, see Working with Amazon Chime Voice Connectors in the Amazon Chime Administration Guide.

The following code example shows how to use associate-signin-delegate-groups-with-account.

Amazon CLI

To associate sign-in delegate groups

The following associate-signin-delegate-groups-with-account example associates the specified sign-in delegate group with the specified Amazon Chime account.

aws chime associate-signin-delegate-groups-with-account \ --account-id 12a3456b-7c89-012d-3456-78901e23fg45 \ --signin-delegate-groups GroupName=my_users

This command produces no output.

For more information, see Managing User Access and Permissions in the Amazon Chime Administration Guide.

The following code example shows how to use batch-create-room-membership.

Amazon CLI

To create multiple room memberships

The following batch-create-room-membership example adds multiple users to a chat room as chat room members. It also assigns administrator and member roles to the users.

aws chime batch-create-room-membership \ --account-id 12a3456b-7c89-012d-3456-78901e23fg45 \ --room-id abcd1e2d-3e45-6789-01f2-3g45h67i890j \ --membership-item-list "MemberId=1ab2345c-67de-8901-f23g-45h678901j2k,Role=Administrator" "MemberId=2ab2345c-67de-8901-f23g-45h678901j2k,Role=Member"

Output:

{ "ResponseMetadata": { "RequestId": "169ba401-d886-475f-8b3f-e01eac6fadfb", "HTTPStatusCode": 201, "HTTPHeaders": { "x-amzn-requestid": "169ba401-d886-475f-8b3f-e01eac6fadfb", "content-type": "application/json", "content-length": "13", "date": "Mon, 02 Dec 2019 22:46:58 GMT", "connection": "keep-alive" }, "RetryAttempts": 0 }, "Errors": [] }

For more information, see Creating a Chat Room in the Amazon Chime User Guide.

The following code example shows how to use batch-delete-phone-number.

Amazon CLI

To delete multiple phone numbers

The following batch-delete-phone-number example deletes all of the specified phone numbers.

aws chime batch-delete-phone-number \ --phone-number-ids "%2B12065550100" "%2B12065550101"

This command produces no output. Output:

{ "PhoneNumberErrors": [] }

For more information, see Working with Phone Numbers in the Amazon Chime Administration Guide.

The following code example shows how to use batch-suspend-user.

Amazon CLI

To suspend multiple users

The following batch-suspend-user example suspends the listed users from the specified Amazon Chime account.

aws chime batch-suspend-user \ --account-id a1b2c3d4-5678-90ab-cdef-11111EXAMPLE \ --user-id-list "a1b2c3d4-5678-90ab-cdef-22222EXAMPLE" "a1b2c3d4-5678-90ab-cdef-33333EXAMPLE" "a1b2c3d4-5678-90ab-cdef-44444EXAMPLE"

Output:

{ "UserErrors": [] }

The following code example shows how to use batch-unsuspend-user.

Amazon CLI

To unsuspend multiple users

The following batch-unsuspend-user example removes any previous suspension for the listed users on the specified Amazon Chime account.

aws chime batch-unsuspend-user \ --account-id a1b2c3d4-5678-90ab-cdef-11111EXAMPLE \ --user-id-list "a1b2c3d4-5678-90ab-cdef-22222EXAMPLE" "a1b2c3d4-5678-90ab-cdef-33333EXAMPLE" "a1b2c3d4-5678-90ab-cdef-44444EXAMPLE"

Output:

{ "UserErrors": [] }

The following code example shows how to use batch-update-phone-number.

Amazon CLI

To update several phone number product types at the same time

The following batch-update-phone-number example updates the product types for all of the specified phone numbers.

aws chime batch-update-phone-number \ --update-phone-number-request-items PhoneNumberId=%2B12065550100,ProductType=BusinessCalling PhoneNumberId=%2B12065550101,ProductType=BusinessCalling

Output:

{ "PhoneNumberErrors": [] }

To update several phone number calling names at the same time

The following batch-update-phone-number example updates the calling names for all of the specified phone numbers.

aws chime batch-update-phone-number \ --update-phone-number-request-items PhoneNumberId=%2B14013143874,CallingName=phonenumber1 PhoneNumberId=%2B14013144061,CallingName=phonenumber2

Output:

{ "PhoneNumberErrors": [] }

For more information, see Working with Phone Numbers in the Amazon Chime Administration Guide.

The following code example shows how to use batch-update-user.

Amazon CLI

To update multiple users in a single command

The following batch-update-user example updates the LicenseType for each of the listed users in the specified Amazon Chime account.

aws chime batch-update-user \ --account-id a1b2c3d4-5678-90ab-cdef-11111EXAMPLE --update-user-request-items "UserId=a1b2c3d4-5678-90ab-cdef-22222EXAMPLE,LicenseType=Basic" "UserId=a1b2c3d4-5678-90ab-cdef-33333EXAMPLE,LicenseType=Basic"

Output:

{ "UserErrors": [] }

The following code example shows how to use create-account.

Amazon CLI

To create an account

The following create-account example creates an Amazon Chime account under the administrator's Amazon account.

aws chime create-account \ --name MyChimeAccount

Output:

{ "Account": { "AwsAccountId": "111122223333", "AccountId": "a1b2c3d4-5678-90ab-cdef-11111EXAMPLE", "Name": "MyChimeAccount", "AccountType": "Team", "CreatedTimestamp": "2019-01-04T17:11:22.003Z", "DefaultLicense": "Pro", "SupportedLicenses": [ "Basic", "Pro" ], "SigninDelegateGroups": [ { "GroupName": "myGroup" }, ] } }

For more information, see Getting Started in the Amazon Chime Administration Guide.

  • For API details, see CreateAccount in Amazon CLI Command Reference.

The following code example shows how to use create-bot.

Amazon CLI

To create an Amazon Chime bot

The following create-bot example creates a bot for the specified Amazon Chime Enterprise account.

aws chime create-bot \ --account-id 12a3456b-7c89-012d-3456-78901e23fg45 \ --display-name "myBot" \ --domain "example.com"

Output:

{ "Bot": { "BotId": "123abcd4-5ef6-789g-0h12-34j56789012k", "UserId": "123abcd4-5ef6-789g-0h12-34j56789012k", "DisplayName": "myBot (Bot)", "BotType": "ChatBot", "Disabled": false, "CreatedTimestamp": "2019-09-09T18:05:56.749Z", "UpdatedTimestamp": "2019-09-09T18:05:56.749Z", "BotEmail": "myBot-chimebot@example.com", "SecurityToken": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" } }

For more information, see Integrate a Chat Bot with Amazon Chime in the Amazon Chime Developer Guide.

  • For API details, see CreateBot in Amazon CLI Command Reference.

The following code example shows how to use create-phone-number-order.

Amazon CLI

To create a phone number order

The following create-phone-number-order example creates a phone number order for the specified phone numbers.

aws chime create-phone-number-order \ --product-type VoiceConnector \ --e164-phone-numbers "+12065550100" "+12065550101" "+12065550102"

Output:

{ "PhoneNumberOrder": { "PhoneNumberOrderId": "abc12345-de67-89f0-123g-h45i678j9012", "ProductType": "VoiceConnector", "Status": "Processing", "OrderedPhoneNumbers": [ { "E164PhoneNumber": "+12065550100", "Status": "Processing" }, { "E164PhoneNumber": "+12065550101", "Status": "Processing" }, { "E164PhoneNumber": "+12065550102", "Status": "Processing" } ], "CreatedTimestamp": "2019-08-09T21:35:21.427Z", "UpdatedTimestamp": "2019-08-09T21:35:22.408Z" } }

For more information, see Working with Phone Numbers in the Amazon Chime Administration Guide.

The following code example shows how to use create-proxy-session.

Amazon CLI

To create a proxy session

The following create-proxy-session example creates a proxy session with voice and SMS capabilities.

aws chime create-proxy-session \ --voice-connector-id abcdef1ghij2klmno3pqr4 \ --participant-phone-numbers "+14015550101" "+12065550100" \ --capabilities "Voice" "SMS"

Output:

{ "ProxySession": { "VoiceConnectorId": "abcdef1ghij2klmno3pqr4", "ProxySessionId": "123a4bc5-67d8-901e-2f3g-h4ghjk56789l", "Status": "Open", "ExpiryMinutes": 60, "Capabilities": [ "SMS", "Voice" ], "CreatedTimestamp": "2020-04-15T16:10:10.288Z", "UpdatedTimestamp": "2020-04-15T16:10:10.288Z", "Participants": [ { "PhoneNumber": "+12065550100", "ProxyPhoneNumber": "+19135550199" }, { "PhoneNumber": "+14015550101", "ProxyPhoneNumber": "+19135550199" } ] } }

For more information, see Proxy Phone Sessions in the Amazon Chime Developer Guide.

The following code example shows how to use create-room-membership.

Amazon CLI

To create a room membership

The following create-room-membership example adds the specified user to the chat room as a chat room member.

aws chime create-room-membership \ --account-id 12a3456b-7c89-012d-3456-78901e23fg45 \ --room-id abcd1e2d-3e45-6789-01f2-3g45h67i890j \ --member-id 1ab2345c-67de-8901-f23g-45h678901j2k

Output:

{ "RoomMembership": { "RoomId": "abcd1e2d-3e45-6789-01f2-3g45h67i890j", "Member": { "MemberId": "1ab2345c-67de-8901-f23g-45h678901j2k", "MemberType": "User", "Email": "janed@example.com", "FullName": "Jane Doe", "AccountId": "12a3456b-7c89-012d-3456-78901e23fg45" }, "Role": "Member", "InvitedBy": "arn:aws:iam::111122223333:user/alejandro", "UpdatedTimestamp": "2019-12-02T22:36:41.969Z" } }

For more information, see Creating a Chat Room in the Amazon Chime User Guide.

The following code example shows how to use create-room.

Amazon CLI

To create a chat room

The following create-room example creates a chat room for the specified Amazon Chime account.

aws chime create-room \ --account-id 12a3456b-7c89-012d-3456-78901e23fg45 \ --name chatRoom

Output:

{ "Room": { "RoomId": "abcd1e2d-3e45-6789-01f2-3g45h67i890j", "Name": "chatRoom", "AccountId": "12a3456b-7c89-012d-3456-78901e23fg45", "CreatedBy": "arn:aws:iam::111122223333:user/alejandro", "CreatedTimestamp": "2019-12-02T22:29:31.549Z", "UpdatedTimestamp": "2019-12-02T22:29:31.549Z" } }

For more information, see Creating a Chat Room in the Amazon Chime User Guide.

  • For API details, see CreateRoom in Amazon CLI Command Reference.

The following code example shows how to use create-user.

Amazon CLI

To create a user profile for a shared device

The following create-user example creates a shared device profile for the specified email address.

aws chime create-user \ --account-id 12a3456b-7c89-012d-3456-78901e23fg45 \ --email roomdevice@example.com \ --user-type SharedDevice

Output:

{ "User": { "UserId": "1ab2345c-67de-8901-f23g-45h678901j2k", "AccountId": "12a3456b-7c89-012d-3456-78901e23fg45", "PrimaryEmail": "roomdevice@example.com", "DisplayName": "Room Device", "LicenseType": "Pro", "UserType": "SharedDevice", "UserRegistrationStatus": "Registered", "RegisteredOn": "2020-01-15T22:38:09.806Z", "AlexaForBusinessMetadata": { "IsAlexaForBusinessEnabled": false } } }

For more information, see Preparing for Setup in the Amazon Chime Administration Guide.

  • For API details, see CreateUser in Amazon CLI Command Reference.

The following code example shows how to use create-voice-connector-group.

Amazon CLI

To create an Amazon Chime Voice Connector group

The following create-voice-connector-group example creates an Amazon Chime Voice Connector group that includes the specified Amazon Chime Voice Connector.

aws chime create-voice-connector-group \ --name myGroup \ --voice-connector-items VoiceConnectorId=abcdef1ghij2klmno3pqr4,Priority=2

Output:

{ "VoiceConnectorGroup": { "VoiceConnectorGroupId": "123a456b-c7d8-90e1-fg23-4h567jkl8901", "Name": "myGroup", "VoiceConnectorItems": [], "CreatedTimestamp": "2019-09-18T16:38:34.734Z", "UpdatedTimestamp": "2019-09-18T16:38:34.734Z" } }

For more information, see Working with Amazon Chime Voice Connector Groups in the Amazon Chime Administration Guide.

The following code example shows how to use create-voice-connector.

Amazon CLI

To create an Amazon Chime Voice Connector

The following create-voice-connector example creates an Amazon Chime Voice Connector in the specified Amazon Region, with encryption enabled.

aws chime create-voice-connector \ --name newVoiceConnector \ --aws-region us-west-2 \ --require-encryption

Output:

{ "VoiceConnector": { "VoiceConnectorId": "abcdef1ghij2klmno3pqr4", "AwsRegion": "us-west-2", "Name": "newVoiceConnector", "OutboundHostName": "abcdef1ghij2klmno3pqr4.voiceconnector.chime.aws", "RequireEncryption": true, "CreatedTimestamp": "2019-09-18T20:34:01.352Z", "UpdatedTimestamp": "2019-09-18T20:34:01.352Z" } }

For more information, see Working with Amazon Chime Voice Connectors in the Amazon Chime Administration Guide.

The following code example shows how to use delete-account.

Amazon CLI

To delete an account

The following delete-account example deletes the specified account.

aws chime delete-account --account-id a1b2c3d4-5678-90ab-cdef-11111EXAMPLE

This command produces no output.

For more information, see Deleting Your Account in the Amazon Chime Administration Guide.

  • For API details, see DeleteAccount in Amazon CLI Command Reference.

The following code example shows how to use delete-phone-number.

Amazon CLI

To delete a phone number

The following delete-phone-number example moves the specified phone number into the deletion queue.

aws chime delete-phone-number \ --phone-number-id "+12065550100"

This command produces no output.

For more information, see Working with Phone Numbers in the Amazon Chime Administration Guide.

The following code example shows how to use delete-proxy-session.

Amazon CLI

To delete a proxy session

The following delete-proxy-session example deletes the specified proxy session.

aws chime delete-proxy-session \ --voice-connector-id abcdef1ghij2klmno3pqr4 \ --proxy-session-id 123a4bc5-67d8-901e-2f3g-h4ghjk56789l

This command produces no output.

For more information, see Proxy Phone Sessions in the Amazon Chime Developer Guide.

The following code example shows how to use delete-room-membership.

Amazon CLI

To remove a user as a member of a chat room

The following delete-room-membership example removes the specified member from the specified chat room.

aws chime delete-room-membership \ --account-id 12a3456b-7c89-012d-3456-78901e23fg45 \ --room-id abcd1e2d-3e45-6789-01f2-3g45h67i890j \ --member-id 1ab2345c-67de-8901-f23g-45h678901j2k

This command produces no output.

For more information, see Creating a Chat Room in the Amazon Chime User Guide.

The following code example shows how to use delete-room.

Amazon CLI

To delete a chat room

The following delete-room example deletes the specified chat room and removes the chat room memberships.

aws chime delete-room \ --account-id 12a3456b-7c89-012d-3456-78901e23fg45 \ --room-id abcd1e2d-3e45-6789-01f2-3g45h67i890j

This command produces no output.

For more information, see Creating a Chat Room in the Amazon Chime User Guide.

  • For API details, see DeleteRoom in Amazon CLI Command Reference.

The following code example shows how to use delete-voice-connector-group.

Amazon CLI

title

The following delete-voice-connector-group example deletes the specified Amazon Chime Voice Connector group.

aws chime delete-voice-connector-group \ --voice-connector-group-id 123a456b-c7d8-90e1-fg23-4h567jkl8901

This command produces no output.

For more information, see Working with Amazon Chime Voice Connector Groups in the Amazon Chime Administration Guide.

The following code example shows how to use delete-voice-connector-origination.

Amazon CLI

To delete origination settings

The following delete-voice-connector-origination example deletes the origination host, port, protocol, priority, and weight from the specified Amazon Chime Voice Connector.

aws chime delete-voice-connector-origination \ --voice-connector-id abcdef1ghij2klmno3pqr4

This command produces no output.

For more information, see Working with Amazon Chime Voice Connectors in the Amazon Chime Administration Guide.

The following code example shows how to use delete-voice-connector-proxy.

Amazon CLI

To delete a proxy configuration

The following delete-voice-connector-proxy example deletes the proxy configuration from your Amazon Chime Voice Connector.

aws chime delete-voice-connector-proxy \ --voice-connector-id abcdef1ghij2klmno3pqr4

This command produces no output.

For more information, see Proxy Phone Sessions in the Amazon Chime Developer Guide.

The following code example shows how to use delete-voice-connector-streaming-configuration.

Amazon CLI

To delete a streaming configuration

The following delete-voice-connector-streaming-configuration example deletes the streaming configuration for the specified Amazon Chime Voice Connector.

aws chime delete-voice-connector-streaming-configuration \ --voice-connector-id abcdef1ghij2klmno3pqr4

This command produces no output.

For more information, see Streaming Amazon Chime Voice Connector Data to Kinesis in the Amazon Chime Administration Guide.

The following code example shows how to use delete-voice-connector-termination-credentials.

Amazon CLI

To delete termination credentials

The following delete-voice-connector-termination-credentials example deletes the termination credentials for the specified user name and Amazon Chime Voice Connector.

aws chime delete-voice-connector-termination-credentials \ --voice-connector-id abcdef1ghij2klmno3pqr4 \ --usernames "jdoe"

This command produces no output.

For more information, see Working with Amazon Chime Voice Connectors in the Amazon Chime Administration Guide.

The following code example shows how to use delete-voice-connector-termination.

Amazon CLI

To delete termination settings

The following delete-voice-connector-termination example deletes the termination settings for the specified Amazon Chime Voice Connector.

aws chime delete-voice-connector-termination \ --voice-connector-id abcdef1ghij2klmno3pqr4

This command produces no output.

For more information, see Working with Amazon Chime Voice Connectors in the Amazon Chime Administration Guide.

The following code example shows how to use delete-voice-connector.

Amazon CLI

To delete an Amazon Chime Voice Connector

The following delete-voice-connector example doesthis

aws chime delete-voice-connector \ --voice-connector-id abcdef1ghij2klmno3pqr4

This command produces no output.

For more information, see Working with Amazon Chime Voice Connectors in the Amazon Chime Administration Guide.

The following code example shows how to use disassociate-phone-number-from-user.

Amazon CLI

To disassociate a phone number from a user

The following disassociate-phone-number-from-user example disassociates a phone number from the specified user.

aws chime disassociate-phone-number-from-user \ --account-id 12a3456b-7c89-012d-3456-78901e23fg45 \ --user-id 1ab2345c-67de-8901-f23g-45h678901j2k

This command produces no output.

For more information, see Managing User Phone Numbers in the Amazon Chime Administration Guide.

The following code example shows how to use disassociate-phone-numbers-from-voice-connector-group.

Amazon CLI

To disassociate phone numbers from an Amazon Chime Voice Connector group

The following disassociate-phone-numbers-from-voice-connector-group example disassociates the specified phone numbers from an Amazon Chime Voice Connector group.

aws chime disassociate-phone-numbers-from-voice-connector-group \ --voice-connector-group-id 123a456b-c7d8-90e1-fg23-4h567jkl8901 \ --e164-phone-numbers "+12065550100" "+12065550101"

Output:

{ "PhoneNumberErrors": [] }

For more information, see Working with Amazon Chime Voice Connector Groups in the Amazon Chime Administration Guide.

The following code example shows how to use disassociate-phone-numbers-from-voice-connector.

Amazon CLI

To disassociate phone numbers from an Amazon Chime Voice Connector

The following disassociate-phone-numbers-from-voice-connector example disassociates the specified phone numbers from an Amazon Chime Voice Connector.

aws chime disassociate-phone-numbers-from-voice-connector \ --voice-connector-id abcdef1ghij2klmno3pqr4 \ --e164-phone-numbers "+12065550100" "+12065550101"

Output:

{ "PhoneNumberErrors": [] }

For more information, see Working with Amazon Chime Voice Connectors in the Amazon Chime Administration Guide.

The following code example shows how to use disassociate-signin-delegate-groups-from-account.

Amazon CLI

To disassociate sign-in delegate groups

The following disassociate-signin-delegate-groups-from-account example disassociates the specified sign-in delegate group from the specified Amazon Chime account.

aws chime disassociate-signin-delegate-groups-from-account \ --account-id 12a3456b-7c89-012d-3456-78901e23fg45 \ --group-names "my_users"

This command produces no output.

For more information, see Managing User Access and Permissions in the Amazon Chime Administration Guide.

The following code example shows how to use get-account-settings.

Amazon CLI

To retrieve settings for an account

The following get-account-settings example retrieves the account settings for the specified account.

aws chime get-account-settings --account-id a1b2c3d4-5678-90ab-cdef-11111EXAMPLE

Output:

{ "AccountSettings": { "DisableRemoteControl": false, "EnableDialOut": false } }

For more information, see Managing Your Amazon Chime Accounts in the Amazon Chime Administration Guide.

The following code example shows how to use get-account.

Amazon CLI

To retrieve the details for an account

The following get-account example retrieves the details for the specified Amazon Chime account.

aws chime get-account \ --account-id a1b2c3d4-5678-90ab-cdef-11111EXAMPLE

Output:

{ "Account": { "AwsAccountId": "111122223333", "AccountId": "a1b2c3d4-5678-90ab-cdef-11111EXAMPLE", "Name": "EnterpriseDirectory", "AccountType": "EnterpriseDirectory", "CreatedTimestamp": "2018-12-20T18:38:02.181Z", "DefaultLicense": "Pro", "SupportedLicenses": [ "Basic", "Pro" ], "SigninDelegateGroups": [ { "GroupName": "myGroup" }, ] } }

For more information, see Managing Your Amazon Chime Accounts in the Amazon Chime Administration Guide.

  • For API details, see GetAccount in Amazon CLI Command Reference.

The following code example shows how to use get-bot.

Amazon CLI

To retrieve details about a bot

The following get-bot example displays the details for the specified bot.

aws chime get-bot \ --account-id 12a3456b-7c89-012d-3456-78901e23fg45 \ --bot-id 123abcd4-5ef6-789g-0h12-34j56789012k

Output:

{ "Bot": { "BotId": "123abcd4-5ef6-789g-0h12-34j56789012k", "UserId": "123abcd4-5ef6-789g-0h12-34j56789012k", "DisplayName": "myBot (Bot)", "BotType": "ChatBot", "Disabled": false, "CreatedTimestamp": "2019-09-09T18:05:56.749Z", "UpdatedTimestamp": "2019-09-09T18:05:56.749Z", "BotEmail": "myBot-chimebot@example.com", "SecurityToken": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" } }

For more information, see Update Chat Bots in the Amazon Chime Developer Guide.

  • For API details, see GetBot in Amazon CLI Command Reference.

The following code example shows how to use get-global-settings.

Amazon CLI

To get global settings

The following get-global-settings example retrieves the S3 bucket names used to store call detail records for Amazon Chime Business Calling and Amazon Chime Voice Connectors associated with the administrator's Amazon account.

aws chime get-global-settings

Output:

{ "BusinessCalling": { "CdrBucket": "s3bucket" }, "VoiceConnector": { "CdrBucket": "s3bucket" } }

For more information, see Managing Global Settings in the Amazon Chime Administration Guide.

The following code example shows how to use get-phone-number-order.

Amazon CLI

To get details for a phone number order

The following get-phone-number-order example displays the details of the specified phone number order.

aws chime get-phone-number-order \ --phone-number-order-id abc12345-de67-89f0-123g-h45i678j9012

Output:

{ "PhoneNumberOrder": { "PhoneNumberOrderId": "abc12345-de67-89f0-123g-h45i678j9012", "ProductType": "VoiceConnector", "Status": "Partial", "OrderedPhoneNumbers": [ { "E164PhoneNumber": "+12065550100", "Status": "Acquired" }, { "E164PhoneNumber": "+12065550101", "Status": "Acquired" }, { "E164PhoneNumber": "+12065550102", "Status": "Failed" } ], "CreatedTimestamp": "2019-08-09T21:35:21.427Z", "UpdatedTimestamp": "2019-08-09T21:35:31.926Z" } }

For more information, see Working with Phone Numbers in the Amazon Chime Administration Guide.

The following code example shows how to use get-phone-number-settings.

Amazon CLI

To retrieve an outbound calling name

The following get-phone-number-settings example retrieves the default outbound calling name for the calling user's Amazon account.

aws chime get-phone-number-settings

This command produces no output. Output:

{ "CallingName": "myName", "CallingNameUpdatedTimestamp": "2019-10-28T18:56:42.911Z" }

For more information, see Working with Phone Numbers in the Amazon Chime Administration Guide.

The following code example shows how to use get-phone-number.

Amazon CLI

To get phone number details

The following get-phone-number example displays the details of the specified phone number.

aws chime get-phone-number \ --phone-number-id +12065550100

Output:

{ "PhoneNumber": { "PhoneNumberId": "%2B12065550100", "E164PhoneNumber": "+12065550100", "Type": "Local", "ProductType": "VoiceConnector", "Status": "Unassigned", "Capabilities": { "InboundCall": true, "OutboundCall": true, "InboundSMS": true, "OutboundSMS": true, "InboundMMS": true, "OutboundMMS": true }, "Associations": [ { "Value": "abcdef1ghij2klmno3pqr4", "Name": "VoiceConnectorId", "AssociatedTimestamp": "2019-10-28T18:40:37.453Z" } ], "CallingNameStatus": "UpdateInProgress", "CreatedTimestamp": "2019-08-09T21:35:21.445Z", "UpdatedTimestamp": "2019-08-09T21:35:31.745Z" } }

For more information, see Working with Phone Numbers in the Amazon Chime Administration Guide.

  • For API details, see GetPhoneNumber in Amazon CLI Command Reference.

The following code example shows how to use get-proxy-session.

Amazon CLI

To get proxy session details

The following get-proxy-session example lists the details of the specified proxy session.

aws chime get-proxy-session \ --voice-connector-id abcdef1ghij2klmno3pqr4 \ --proxy-session-id 123a4bc5-67d8-901e-2f3g-h4ghjk56789l

Output:

{ "ProxySession": { "VoiceConnectorId": "abcdef1ghij2klmno3pqr4", "ProxySessionId": "123a4bc5-67d8-901e-2f3g-h4ghjk56789l", "Status": "Open", "ExpiryMinutes": 60, "Capabilities": [ "SMS", "Voice" ], "CreatedTimestamp": "2020-04-15T16:10:10.288Z", "UpdatedTimestamp": "2020-04-15T16:10:10.288Z", "Participants": [ { "PhoneNumber": "+12065550100", "ProxyPhoneNumber": "+19135550199" }, { "PhoneNumber": "+14015550101", "ProxyPhoneNumber": "+19135550199" } ] } }

For more information, see Proxy Phone Sessions in the Amazon Chime Developer Guide.

The following code example shows how to use get-room.

Amazon CLI

To get the details about a chat room

The following get-room example displays details about the specified chat room.

aws chime get-room \ --account-id 12a3456b-7c89-012d-3456-78901e23fg45 \ --room-id abcd1e2d-3e45-6789-01f2-3g45h67i890j

Output:

{ "Room": { "RoomId": "abcd1e2d-3e45-6789-01f2-3g45h67i890j", "Name": "chatRoom", "AccountId": "12a3456b-7c89-012d-3456-78901e23fg45", "CreatedBy": "arn:aws:iam::111122223333:user/alejandro", "CreatedTimestamp": "2019-12-02T22:29:31.549Z", "UpdatedTimestamp": "2019-12-02T22:29:31.549Z" } }

For more information, see Creating a Chat Room in the Amazon Chime User Guide.

  • For API details, see GetRoom in Amazon CLI Command Reference.

The following code example shows how to use get-user-settings.

Amazon CLI

To retrieve user settings

The following get-user-settings example displays the specified user settings.

aws chime get-user-settings \ --account-id 12a3456b-7c89-012d-3456-78901e23fg45 \ --user-id 1ab2345c-67de-8901-f23g-45h678901j2k

Output:

{ "UserSettings": { "Telephony": { "InboundCalling": true, "OutboundCalling": true, "SMS": true } } }

For more information, see Managing User Phone Numbers in the Amazon Chime Administration Guide.

The following code example shows how to use get-user.

Amazon CLI

To get details about a user

The following get-user example retrieves the details for the specified user.

aws chime get-user \ --account-id a1b2c3d4-5678-90ab-cdef-11111EXAMPLE \ --user-id a1b2c3d4-5678-90ab-cdef-22222EXAMPLE

Output:

{ "User": { "UserId": "a1b2c3d4-5678-90ab-cdef-22222EXAMPLE", "AccountId": "a1b2c3d4-5678-90ab-cdef-11111EXAMPLE", "PrimaryEmail": "marthar@example.com", "DisplayName": "Martha Rivera", "LicenseType": "Pro", "UserRegistrationStatus": "Registered", "RegisteredOn": "2018-12-20T18:45:25.231Z", "InvitedOn": "2018-12-20T18:45:25.231Z", "AlexaForBusinessMetadata": { "IsAlexaForBusinessEnabled": False, "AlexaForBusinessRoomArn": "null" }, "PersonalPIN": "XXXXXXXXXX" } }

For more information, see Managing Users in the Amazon Chime Administration Guide.

  • For API details, see GetUser in Amazon CLI Command Reference.

The following code example shows how to use get-voice-connector-group.

Amazon CLI

To get details for an Amazon Chime Voice Connector group

The following get-voice-connector-group example displays details for the specified Amazon Chime Voice Connector group.

aws chime get-voice-connector-group \ --voice-connector-group-id 123a456b-c7d8-90e1-fg23-4h567jkl8901

Output:

{ "VoiceConnectorGroup": { "VoiceConnectorGroupId": "123a456b-c7d8-90e1-fg23-4h567jkl8901", "Name": "myGroup", "VoiceConnectorItems": [], "CreatedTimestamp": "2019-09-18T16:38:34.734Z", "UpdatedTimestamp": "2019-09-18T16:38:34.734Z" } }

For more information, see Working with Amazon Chime Voice Connector Groups in the Amazon Chime Administration Guide.

The following code example shows how to use get-voice-connector-logging-configuration.

Amazon CLI

To get logging configuration details

The following get-voice-connector-logging-configuration example retreives the logging configuration details for the specified Amazon Chime Voice Connector.

aws chime get-voice-connector-logging-configuration \ --voice-connector-id abcdef1ghij2klmno3pqr4

Output:

{ "LoggingConfiguration": { "EnableSIPLogs": true } }

For more information, see Streaming Amazon Chime Voice Connector Media to Kinesis in the Amazon Chime Administration Guide.

The following code example shows how to use get-voice-connector-origination.

Amazon CLI

To retrieve origination settings

The following get-voice-connector-origination example retrieves the origination host, port, protocol, priority, and weight for the specified Amazon Chime Voice Connector.

aws chime get-voice-connector-origination \ --voice-connector-id abcdef1ghij2klmno3pqr4

Output:

{ "Origination": { "Routes": [ { "Host": "10.24.34.0", "Port": 1234, "Protocol": "TCP", "Priority": 1, "Weight": 5 } ], "Disabled": false } }

For more information, see Working with Amazon Chime Voice Connectors in the Amazon Chime Administration Guide.

The following code example shows how to use get-voice-connector-proxy.

Amazon CLI

To get proxy configuration details

The following get-voice-connector-proxy example gets the proxy configuration details for your Amazon Chime Voice Connector.

aws chime get-voice-connector-proxy \ --voice-connector-id abcdef1ghij2klmno3pqr4

Output:

{ "Proxy": { "DefaultSessionExpiryMinutes": 60, "Disabled": false, "PhoneNumberCountries": [ "US" ] } }

For more information, see Proxy Phone Sessions in the Amazon Chime Developer Guide.

The following code example shows how to use get-voice-connector-streaming-configuration.

Amazon CLI

To get streaming configuration details

The following get-voice-connector-streaming-configuration example gets the streaming configuration details for the specified Amazon Chime Voice Connector.

aws chime get-voice-connector-streaming-configuration \ --voice-connector-id abcdef1ghij2klmno3pqr4

Output:

{ "StreamingConfiguration": { "DataRetentionInHours": 24, "Disabled": false } }

For more information, see Streaming Amazon Chime Voice Connector Data to Kinesis in the Amazon Chime Administration Guide.

The following code example shows how to use get-voice-connector-termination-health.

Amazon CLI

To retrieve termination health details

The following get-voice-connector-termination-health example retrieves the termination health details for the specified Amazon Chime Voice Connector.

aws chime get-voice-connector-termination-health \ --voice-connector-id abcdef1ghij2klmno3pqr4

Output:

{ "TerminationHealth": { "Timestamp": "Fri Aug 23 16:45:55 UTC 2019", "Source": "10.24.34.0" } }

For more information, see Working with Amazon Chime Voice Connectors in the Amazon Chime Administration Guide.

The following code example shows how to use get-voice-connector-termination.

Amazon CLI

To retrieve termination settings

The following get-voice-connector-termination example retrieves the termination settings for the specified Amazon Chime Voice Connector.

aws chime get-voice-connector-termination \ --voice-connector-id abcdef1ghij2klmno3pqr4

This command produces no output. Output:

{ "Termination": { "CpsLimit": 1, "DefaultPhoneNumber": "+12065550100", "CallingRegions": [ "US" ], "CidrAllowedList": [ "10.24.34.0/23" ], "Disabled": false } }

For more information, see Working with Amazon Chime Voice Connectors in the Amazon Chime Administration Guide.

The following code example shows how to use get-voice-connector.

Amazon CLI

To get details for an Amazon Chime Voice Connector

The following get-voice-connector example displays the details of the specified Amazon Chime Voice Connector.

aws chime get-voice-connector \ --voice-connector-id abcdef1ghij2klmno3pqr4

Output:

{ "VoiceConnector": { "VoiceConnectorId": "abcdef1ghij2klmno3pqr4", "AwsRegion": "us-west-2", "Name": "newVoiceConnector", "OutboundHostName": "abcdef1ghij2klmno3pqr4.voiceconnector.chime.aws", "RequireEncryption": true, "CreatedTimestamp": "2019-09-18T20:34:01.352Z", "UpdatedTimestamp": "2019-09-18T20:34:01.352Z" } }

For more information, see Working with Amazon Chime Voice Connectors in the Amazon Chime Administration Guide.

The following code example shows how to use invite-users.

Amazon CLI

To invite users to join Amazon Chime

The following invite-users example sends an email to invite a user to the specified Amazon Chime account.

aws chime invite-users \ --account-id a1b2c3d4-5678-90ab-cdef-11111EXAMPLE \ --user-email-list "alejandror@example.com" "janed@example.com"

Output:

{ "Invites": [ { "InviteId": "a1b2c3d4-5678-90ab-cdef-22222EXAMPLE", "Status": "Pending", "EmailAddress": "alejandror@example.com", "EmailStatus": "Sent" } { "InviteId": "a1b2c3d4-5678-90ab-cdef-33333EXAMPLE", "Status": "Pending", "EmailAddress": "janed@example.com", "EmailStatus": "Sent" } ] }

For more information, see Inviting and Suspending Users in the Amazon Chime Administration Guide.

  • For API details, see InviteUsers in Amazon CLI Command Reference.

The following code example shows how to use list-accounts.

Amazon CLI

To get a list of accounts

The following list-accounts example retrieves a list of the Amazon Chime accounts in the administrator's Amazon account.

aws chime list-accounts

Output:

{ "Accounts": [ { "AwsAccountId": "111122223333", "AccountId": "a1b2c3d4-5678-90ab-cdef-11111EXAMPLE", "Name": "First Chime Account", "AccountType": "EnterpriseDirectory", "CreatedTimestamp": "2018-12-20T18:38:02.181Z", "DefaultLicense": "Pro", "SupportedLicenses": [ "Basic", "Pro" ], "SigninDelegateGroups": [ { "GroupName": "myGroup" }, ] }, { "AwsAccountId": "111122223333", "AccountId": "a1b2c3d4-5678-90ab-cdef-22222EXAMPLE", "Name": "Second Chime Account", "AccountType": "Team", "CreatedTimestamp": "2018-09-04T21:44:22.292Z", "DefaultLicense": "Pro", "SupportedLicenses": [ "Basic", "Pro" ], "SigninDelegateGroups": [ { "GroupName": "myGroup" }, ] } ] }

For more information, see Managing Your Amazon Chime Accounts in the Amazon Chime Administration Guide.

  • For API details, see ListAccounts in Amazon CLI Command Reference.

The following code example shows how to use list-bots.

Amazon CLI

To retrieve a list of bots

The following list-bots example lists the bots associated with the specified Amazon Chime Enterprise account.

aws chime list-bots \ --account-id 12a3456b-7c89-012d-3456-78901e23fg45

Output:

{ "Bot": { "BotId": "123abcd4-5ef6-789g-0h12-34j56789012k", "UserId": "123abcd4-5ef6-789g-0h12-34j56789012k", "DisplayName": "myBot (Bot)", "BotType": "ChatBot", "Disabled": false, "CreatedTimestamp": "2019-09-09T18:05:56.749Z", "UpdatedTimestamp": "2019-09-09T18:05:56.749Z", "BotEmail": "myBot-chimebot@example.com", "SecurityToken": "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" } }

For more information, see Use Chat Bots with Amazon Chime in the Amazon Chime Developer Guide.

  • For API details, see ListBots in Amazon CLI Command Reference.

The following code example shows how to use list-phone-number-orders.

Amazon CLI

To list phone number orders

The following list-phone-number-orders example lists the phone number orders associated with the Amazon Chime administrator's account.

aws chime list-phone-number-orders

Output:

{ "PhoneNumberOrders": [ { "PhoneNumberOrderId": "abc12345-de67-89f0-123g-h45i678j9012", "ProductType": "VoiceConnector", "Status": "Partial", "OrderedPhoneNumbers": [ { "E164PhoneNumber": "+12065550100", "Status": "Acquired" }, { "E164PhoneNumber": "+12065550101", "Status": "Acquired" }, { "E164PhoneNumber": "+12065550102", "Status": "Failed" } ], "CreatedTimestamp": "2019-08-09T21:35:21.427Z", "UpdatedTimestamp": "2019-08-09T21:35:31.926Z" } { "PhoneNumberOrderId": "cba54321-ed76-09f5-321g-h54i876j2109", "ProductType": "BusinessCalling", "Status": "Partial", "OrderedPhoneNumbers": [ { "E164PhoneNumber": "+12065550103", "Status": "Acquired" }, { "E164PhoneNumber": "+12065550104", "Status": "Acquired" }, { "E164PhoneNumber": "+12065550105", "Status": "Failed" } ], "CreatedTimestamp": "2019-08-09T21:35:21.427Z", "UpdatedTimestamp": "2019-08-09T21:35:31.926Z" } ] }

For more information, see Working with Phone Numbers in the Amazon Chime Administration Guide.

The following code example shows how to use list-phone-numbers.

Amazon CLI

To list phone numbers for an Amazon Chime account

The following list-phone-numbers example lists the phone numbers associated with the administrator's Amazon Chime account.

aws chime list-phone-numbers

This command produces no output. Output:

{ "PhoneNumbers": [ { "PhoneNumberId": "%2B12065550100", "E164PhoneNumber": "+12065550100", "Type": "Local", "ProductType": "VoiceConnector", "Status": "Assigned", "Capabilities": { "InboundCall": true, "OutboundCall": true, "InboundSMS": true, "OutboundSMS": true, "InboundMMS": true, "OutboundMMS": true }, "Associations": [ { "Value": "abcdef1ghij2klmno3pqr4", "Name": "VoiceConnectorId", "AssociatedTimestamp": "2019-10-28T18:40:37.453Z" } ], "CallingNameStatus": "UpdateInProgress", "CreatedTimestamp": "2019-08-12T22:10:20.521Z", "UpdatedTimestamp": "2019-10-28T18:42:07.964Z" }, { "PhoneNumberId": "%2B12065550101", "E164PhoneNumber": "+12065550101", "Type": "Local", "ProductType": "VoiceConnector", "Status": "Assigned", "Capabilities": { "InboundCall": true, "OutboundCall": true, "InboundSMS": true, "OutboundSMS": true, "InboundMMS": true, "OutboundMMS": true }, "Associations": [ { "Value": "abcdef1ghij2klmno3pqr4", "Name": "VoiceConnectorId", "AssociatedTimestamp": "2019-10-28T18:40:37.511Z" } ], "CallingNameStatus": "UpdateInProgress", "CreatedTimestamp": "2019-08-12T22:10:20.521Z", "UpdatedTimestamp": "2019-10-28T18:42:07.960Z" } ] }

For more information, see Working with Phone Numbers in the Amazon Chime Administration Guide.

The following code example shows how to use list-proxy-sessions.

Amazon CLI

To list proxy sessions

The following list-proxy-sessions example lists the proxy sessions for your Amazon Chime Voice Connector.

aws chime list-proxy-sessions \ --voice-connector-id abcdef1ghij2klmno3pqr4

Output:

{ "ProxySession": { "VoiceConnectorId": "abcdef1ghij2klmno3pqr4", "ProxySessionId": "123a4bc5-67d8-901e-2f3g-h4ghjk56789l", "Status": "Open", "ExpiryMinutes": 60, "Capabilities": [ "SMS", "Voice" ], "CreatedTimestamp": "2020-04-15T16:10:10.288Z", "UpdatedTimestamp": "2020-04-15T16:10:10.288Z", "Participants": [ { "PhoneNumber": "+12065550100", "ProxyPhoneNumber": "+19135550199" }, { "PhoneNumber": "+14015550101", "ProxyPhoneNumber": "+19135550199" } ] } }

For more information, see Proxy Phone Sessions in the Amazon Chime Developer Guide.

The following code example shows how to use list-room-memberships.

Amazon CLI

To list room memberships

The following list-room-memberships example displays a list of the membership details for the specified chat room.

aws chime list-room-memberships \ --account-id 12a3456b-7c89-012d-3456-78901e23fg45 \ --room-id abcd1e2d-3e45-6789-01f2-3g45h67i890j

Output:

{ "RoomMemberships": [ { "RoomId": "abcd1e2d-3e45-6789-01f2-3g45h67i890j", "Member": { "MemberId": "2ab2345c-67de-8901-f23g-45h678901j2k", "MemberType": "User", "Email": "zhangw@example.com", "FullName": "Zhang Wei", "AccountId": "12a3456b-7c89-012d-3456-78901e23fg45" }, "Role": "Member", "InvitedBy": "arn:aws:iam::111122223333:user/alejandro", "UpdatedTimestamp": "2019-12-02T22:46:58.532Z" }, { "RoomId": "abcd1e2d-3e45-6789-01f2-3g45h67i890j", "Member": { "MemberId": "1ab2345c-67de-8901-f23g-45h678901j2k", "MemberType": "User", "Email": "janed@example.com", "FullName": "Jane Doe", "AccountId": "12a3456b-7c89-012d-3456-78901e23fg45" }, "Role": "Administrator", "InvitedBy": "arn:aws:iam::111122223333:user/alejandro", "UpdatedTimestamp": "2019-12-02T22:46:58.532Z" } ] }

For more information, see Creating a Chat Room in the Amazon Chime User Guide.

The following code example shows how to use list-rooms.

Amazon CLI

To list chat rooms

The following list-rooms example displays a list of chat rooms in the specified account. The list is filtered to only those chat rooms that the specified member belongs to.

aws chime list-rooms \ --account-id 12a3456b-7c89-012d-3456-78901e23fg45 \ --member-id 1ab2345c-67de-8901-f23g-45h678901j2k

Output:

{ "Room": { "RoomId": "abcd1e2d-3e45-6789-01f2-3g45h67i890j", "Name": "teamRoom", "AccountId": "12a3456b-7c89-012d-3456-78901e23fg45", "CreatedBy": "arn:aws:iam::111122223333:user/alejandro", "CreatedTimestamp": "2019-12-02T22:29:31.549Z", "UpdatedTimestamp": "2019-12-02T22:33:19.310Z" } }

For more information, see Creating a Chat Room in the Amazon Chime User Guide.

  • For API details, see ListRooms in Amazon CLI Command Reference.

The following code example shows how to use list-users.

Amazon CLI

To list the users in an account

The following list-users example lists the users for the specified Amazon Chime account.

aws chime list-users --account-id a1b2c3d4-5678-90ab-cdef-11111EXAMPLE

Output:

{ "Users": [ { "UserId": "a1b2c3d4-5678-90ab-cdef-22222EXAMPLE", "AccountId": "a1b2c3d4-5678-90ab-cdef-11111EXAMPLE", "PrimaryEmail": "mariag@example.com", "DisplayName": "Maria Garcia", "LicenseType": "Pro", "UserType": "PrivateUser", "UserRegistrationStatus": "Registered", "RegisteredOn": "2018-12-20T18:45:25.231Z" "AlexaForBusinessMetadata": { "IsAlexaForBusinessEnabled": false } }, { "UserId": "a1b2c3d4-5678-90ab-cdef-33333EXAMPLE", "AccountId": "a1b2c3d4-5678-90ab-cdef-11111EXAMPLE", "PrimaryEmail": "richardr@example.com", "DisplayName": "Richard Roe", "LicenseType": "Pro", "UserType": "PrivateUser", "UserRegistrationStatus": "Registered", "RegisteredOn": "2018-12-20T18:45:45.415Z" "AlexaForBusinessMetadata": { "IsAlexaForBusinessEnabled": false } }, { "UserId": "a1b2c3d4-5678-90ab-cdef-44444EXAMPLE", "AccountId": "a1b2c3d4-5678-90ab-cdef-11111EXAMPLE", "PrimaryEmail": "saanvis@example.com", "DisplayName": "Saanvi Sarkar", "LicenseType": "Basic", "UserType": "PrivateUser", "UserRegistrationStatus": "Registered", "RegisteredOn": "2018-12-20T18:46:57.747Z" "AlexaForBusinessMetadata": { "IsAlexaForBusinessEnabled": false } }, { "UserId": "a1b2c3d4-5678-90ab-cdef-55555EXAMPLE", "AccountId": "a1b2c3d4-5678-90ab-cdef-11111EXAMPLE", "PrimaryEmail": "wxiulan@example.com", "DisplayName": "Wang Xiulan", "LicenseType": "Basic", "UserType": "PrivateUser", "UserRegistrationStatus": "Registered", "RegisteredOn": "2018-12-20T18:47:15.390Z" "AlexaForBusinessMetadata": { "IsAlexaForBusinessEnabled": false } } ] }

For more information, see Managing Users in the Amazon Chime Administration Guide.

  • For API details, see ListUsers in Amazon CLI Command Reference.

The following code example shows how to use list-voice-connector-groups.

Amazon CLI

To list Amazon Chime Voice Connector groups for an Amazon Chime account

The following list-voice-connector-groups example lists the Amazon Chime Voice Connector groups associated with the administrator's Amazon Chime account.

aws chime list-voice-connector-groups

Output:

{ "VoiceConnectorGroups": [ { "VoiceConnectorGroupId": "123a456b-c7d8-90e1-fg23-4h567jkl8901", "Name": "myGroup", "VoiceConnectorItems": [], "CreatedTimestamp": "2019-09-18T16:38:34.734Z", "UpdatedTimestamp": "2019-09-18T16:38:34.734Z" } ] }

For more information, see Working with Amazon Chime Voice Connector groups in the Amazon Chime Administration Guide.

The following code example shows how to use list-voice-connector-termination-credentials.

Amazon CLI

To retrieve a list of termination credentials

The following list-voice-connector-termination-credentials example retrieves a list of the termination credentials for the specified Amazon Chime Voice Connector.

aws chime list-voice-connector-termination-credentials \ --voice-connector-id abcdef1ghij2klmno3pqr4

This command produces no output. Output:

{ "Usernames": [ "jdoe" ] }

For more information, see Working with Amazon Chime Voice Connectors in the Amazon Chime Administration Guide.

The following code example shows how to use list-voice-connectors.

Amazon CLI

To list Amazon Chime Voice Connectors for an account

The following list-voice-connectors example lists the Amazon Chime Voice Connectors associated with the caller's account.

aws chime list-voice-connectors

Output:

{ "VoiceConnectors": [ { "VoiceConnectorId": "abcdef1ghij2klmno3pqr4", "AwsRegion": "us-east-1", "Name": "MyVoiceConnector", "OutboundHostName": "abcdef1ghij2klmno3pqr4.voiceconnector.chime.aws", "RequireEncryption": true, "CreatedTimestamp": "2019-06-04T18:46:56.508Z", "UpdatedTimestamp": "2019-09-18T16:33:00.806Z" }, { "VoiceConnectorId": "cbadef1ghij2klmno3pqr5", "AwsRegion": "us-west-2", "Name": "newVoiceConnector", "OutboundHostName": "cbadef1ghij2klmno3pqr5.voiceconnector.chime.aws", "RequireEncryption": true, "CreatedTimestamp": "2019-09-18T20:34:01.352Z", "UpdatedTimestamp": "2019-09-18T20:34:01.352Z" } ] }

For more information, see Working with Amazon Chime Voice Connectors in the Amazon Chime Administration Guide.

The following code example shows how to use logout-user.

Amazon CLI

To log out a user

The following logout-user example logs out the specified user.

aws chime logout-user \ --account-id a1b2c3d4-5678-90ab-cdef-11111EXAMPLE \ --user-id a1b2c3d4-5678-90ab-cdef-22222EXAMPLE

This command produces no output.

  • For API details, see LogoutUser in Amazon CLI Command Reference.

The following code example shows how to use put-voice-connector-logging-configuration.

Amazon CLI

To add a logging configuration for an Amazon Chime Voice Connector

The following put-voice-connector-logging-configuration example turns on the SIP logging configuration for the specified Amazon Chime Voice Connector.

aws chime put-voice-connector-logging-configuration \ --voice-connector-id abcdef1ghij2klmno3pqr4 \ --logging-configuration EnableSIPLogs=true

Output:

{ "LoggingConfiguration": { "EnableSIPLogs": true } }

For more information, see Streaming Amazon Chime Voice Connector Media to Kinesis in the Amazon Chime Administration Guide.

The following code example shows how to use put-voice-connector-origination.

Amazon CLI

To set up origination settings

The following put-voice-connector-origination example sets up the origination host, port, protocol, priority, and weight for the specified Amazon Chime Voice Connector.

aws chime put-voice-connector-origination \ --voice-connector-id abcdef1ghij2klmno3pqr4 \ --origination Routes=[{Host="10.24.34.0",Port=1234,Protocol="TCP",Priority=1,Weight=5}],Disabled=false

Output:

{ "Origination": { "Routes": [ { "Host": "10.24.34.0", "Port": 1234, "Protocol": "TCP", "Priority": 1, "Weight": 5 } ], "Disabled": false } }

For more information, see Working with Amazon Chime Voice Connectors in the Amazon Chime Administration Guide.

The following code example shows how to use put-voice-connector-proxy.

Amazon CLI

To put a proxy configuration

The following put-voice-connector-proxy example sets a proxy configuration to your Amazon Chime Voice Connector.

aws chime put-voice-connector-proxy \ --voice-connector-id abcdef1ghij2klmno3pqr4 \ --default-session-expiry-minutes 60 \ --phone-number-pool-countries "US"

Output:

{ "Proxy": { "DefaultSessionExpiryMinutes": 60, "Disabled": false, "PhoneNumberCountries": [ "US" ] } }

For more information, see Proxy Phone Sessions in the Amazon Chime Developer Guide.

The following code example shows how to use put-voice-connector-streaming-configuration.

Amazon CLI

To create a streaming configuration

The following put-voice-connector-streaming-configuration example creates a streaming configuration for the specified Amazon Chime Voice Connector. It enables media streaming from the Amazon Chime Voice Connector to Amazon Kinesis, and sets the data retention period to 24 hours.

aws chime put-voice-connector-streaming-configuration \ --voice-connector-id abcdef1ghij2klmno3pqr4 \ --streaming-configuration DataRetentionInHours=24,Disabled=false

Output:

{ "StreamingConfiguration": { "DataRetentionInHours": 24, "Disabled": false } }

For more information, see Streaming Amazon Chime Voice Connector Data to Kinesis in the Amazon Chime Administration Guide.

The following code example shows how to use put-voice-connector-termination-credentials.

Amazon CLI

To set up termination credentials

The following put-voice-connector-termination-credentials example sets termination credentials for the specified Amazon Chime Voice Connector.

aws chime put-voice-connector-termination-credentials \ --voice-connector-id abcdef1ghij2klmno3pqr4 \ --credentials Username="jdoe",Password="XXXXXXXX"

This command produces no output.

For more information, see Working with Amazon Chime Voice Connectors in the Amazon Chime Administration Guide.

The following code example shows how to use put-voice-connector-termination.

Amazon CLI

To set up termination settings

The following put-voice-connector-termination example sets the calling regions and allowed IP host termination settings for the specified Amazon Chime Voice Connector.

aws chime put-voice-connector-termination \ --voice-connector-id abcdef1ghij2klmno3pqr4 \ --termination CallingRegions="US",CidrAllowedList="10.24.34.0/23",Disabled=false

Output:

{ "Termination": { "CpsLimit": 0, "CallingRegions": [ "US" ], "CidrAllowedList": [ "10.24.34.0/23" ], "Disabled": false } }

For more information, see Working with Amazon Chime Voice Connectors in the Amazon Chime Administration Guide.

The following code example shows how to use regenerate-security-token.

Amazon CLI

To regenerate a security token

The following regenerate-security-token example regenerates the security token for the specified bot.

aws chime regenerate-security-token \ --account-id 12a3456b-7c89-012d-3456-78901e23fg45 \ --bot-id 123abcd4-5ef6-789g-0h12-34j56789012k

Output:

{ "Bot": { "BotId": "123abcd4-5ef6-789g-0h12-34j56789012k", "UserId": "123abcd4-5ef6-789g-0h12-34j56789012k", "DisplayName": "myBot (Bot)", "BotType": "ChatBot", "Disabled": false, "CreatedTimestamp": "2019-09-09T18:05:56.749Z", "UpdatedTimestamp": "2019-09-09T18:05:56.749Z", "BotEmail": "myBot-chimebot@example.com", "SecurityToken": "je7MtGbClwBF/2Zp9Utk/h3yCo8nvbEXAMPLEKEY" } }

For more information, see Authenticate Chat Bot Requests in the Amazon Chime Developer Guide.

The following code example shows how to use reset-personal-pin.

Amazon CLI

To reset a user's personal meeting PIN

The following reset-personal-pin example resets the specified user's personal meeting PIN.

aws chime reset-personal-pin \ --account-id a1b2c3d4-5678-90ab-cdef-11111EXAMPLE --user-id a1b2c3d4-5678-90ab-cdef-22222EXAMPLE

Output:

{ "User": { "UserId": "a1b2c3d4-5678-90ab-cdef-22222EXAMPLE", "AccountId": "a1b2c3d4-5678-90ab-cdef-11111EXAMPLE", "PrimaryEmail": "mateo@example.com", "DisplayName": "Mateo Jackson", "LicenseType": "Pro", "UserType": "PrivateUser", "UserRegistrationStatus": "Registered", "RegisteredOn": "2018-12-20T18:45:25.231Z", "AlexaForBusinessMetadata": { "IsAlexaForBusinessEnabled": False, "AlexaForBusinessRoomArn": "null" }, "PersonalPIN": "XXXXXXXXXX" } }

For more information, see Changing Personal Meeting PINs in the Amazon Chime Administration Guide.

The following code example shows how to use restore-phone-number.

Amazon CLI

To restore a phone number

The following restore-phone-number example restores the specified phone number from the deletion queue.

aws chime restore-phone-number \ --phone-number-id "+12065550100"

Output:

{ "PhoneNumber": { "PhoneNumberId": "%2B12065550100", "E164PhoneNumber": "+12065550100", "Type": "Local", "ProductType": "BusinessCalling", "Status": "Unassigned", "Capabilities": { "InboundCall": true, "OutboundCall": true, "InboundSMS": true, "OutboundSMS": true, "InboundMMS": true, "OutboundMMS": true }, "Associations": [], "CreatedTimestamp": "2019-08-09T21:35:21.445Z", "UpdatedTimestamp": "2019-08-12T22:06:36.355Z" } }

For more information, see Working with Phone Numbers in the Amazon Chime Administration Guide.

The following code example shows how to use search-available-phone-numbers.

Amazon CLI

To search available phone numbers

The following search-available-phone-numbers example searches available phone numbers by area code.

aws chime search-available-phone-numbers \ --area-code "206"

Output:

{ "E164PhoneNumbers": [ "+12065550100", "+12065550101", "+12065550102", "+12065550103", "+12065550104", "+12065550105", "+12065550106", "+12065550107", "+12065550108", "+12065550109", ] }

For more information, see Working with Phone Numbers in the Amazon Chime Administration Guide.

The following code example shows how to use update-account-settings.

Amazon CLI

To update the settings for your account

The following update-account-settings example disables the remote control of shared screens for the specified Amazon Chime account.

aws chime update-account-settings \ --account-id a1b2c3d4-5678-90ab-cdef-11111EXAMPLE \ --account-settings DisableRemoteControl=true

This command produces no output.

The following code example shows how to use update-account.

Amazon CLI

To update an account

The following update-account example updates the specified account name.

aws chime update-account \ --account-id a1b2c3d4-5678-90ab-cdef-11111EXAMPLE \ --name MyAccountName

Output:

{ "Account": { "AwsAccountId": "111122223333", "AccountId": "a1b2c3d4-5678-90ab-cdef-11111EXAMPLE", "Name": "MyAccountName", "AccountType": "Team", "CreatedTimestamp": "2018-09-04T21:44:22.292Z", "DefaultLicense": "Pro", "SupportedLicenses": [ "Basic", "Pro" ], "SigninDelegateGroups": [ { "GroupName": "myGroup" }, ] } }

For more information, see Renaming Your Account in the Amazon Chime Administration Guide.

  • For API details, see UpdateAccount in Amazon CLI Command Reference.

The following code example shows how to use update-bot.

Amazon CLI

To update a bot

The following update-bot example updates the status of the specified bot to stop it from running.

aws chime update-bot \ --account-id 12a3456b-7c89-012d-3456-78901e23fg45 \ --bot-id 123abcd4-5ef6-789g-0h12-34j56789012k \ --disabled

Output:

{ "Bot": { "BotId": "123abcd4-5ef6-789g-0h12-34j56789012k", "UserId": "123abcd4-5ef6-789g-0h12-34j56789012k", "DisplayName": "myBot (Bot)", "BotType": "ChatBot", "Disabled": true, "CreatedTimestamp": "2019-09-09T18:05:56.749Z", "UpdatedTimestamp": "2019-09-09T18:05:56.749Z", "BotEmail": "myBot-chimebot@example.com", "SecurityToken": "je7MtGbClwBF/2Zp9Utk/h3yCo8nvbEXAMPLEKEY" } }

For more information, see Update Chat Bots in the Amazon Chime Developer Guide.

  • For API details, see UpdateBot in Amazon CLI Command Reference.

The following code example shows how to use update-global-settings.

Amazon CLI

To update global settings

The following update-global-settings example updates the S3 bucket used to store call detail records for Amazon Chime Business Calling and Amazon Chime Voice Connectors associated with the administrator's Amazon account.

aws chime update-global-settings \ --business-calling CdrBucket="s3bucket" \ --voice-connector CdrBucket="s3bucket"

This command produces no output.

For more information, see Managing Global Settings in the Amazon Chime Administration Guide.

The following code example shows how to use update-phone-number-settings.

Amazon CLI

To update an outbound calling name

The following update-phone-number-settings example updates the default outbound calling name for the administrator's Amazon account.

aws chime update-phone-number-settings \ --calling-name "myName"

This command produces no output.

For more information, see Working with Phone Numbers in the Amazon Chime Administration Guide.

The following code example shows how to use update-phone-number.

Amazon CLI

Example 1: To update the product type for a phone number

The following update-phone-number example updates the specified phone number's product type.

aws chime update-phone-number \ --phone-number-id "+12065550100" \ --product-type "BusinessCalling"

Output:

{ "PhoneNumber": { "PhoneNumberId": "%2B12065550100", "E164PhoneNumber": "+12065550100", "Type": "Local", "ProductType": "BusinessCalling", "Status": "Unassigned", "Capabilities": { "InboundCall": true, "OutboundCall": true, "InboundSMS": true, "OutboundSMS": true, "InboundMMS": true, "OutboundMMS": true }, "Associations": [], "CallingName": "phonenumber1", "CreatedTimestamp": "2019-08-09T21:35:21.445Z", "UpdatedTimestamp": "2019-08-12T21:44:07.591Z" } }

Example 2: To update the outbound calling name for a phone number

The following update-phone-number example updates the outbound calling name for the specified phone number.

aws chime update-phone-number --phone-number-id "+12065550100" --calling-name "phonenumber2"

Output:

{ "PhoneNumber": { "PhoneNumberId": "%2B12065550100", "E164PhoneNumber": "+12065550100", "Type": "Local", "ProductType": "BusinessCalling", "Status": "Unassigned", "Capabilities": { "InboundCall": true, "OutboundCall": true, "InboundSMS": true, "OutboundSMS": true, "InboundMMS": true, "OutboundMMS": true }, "Associations": [], "CallingName": "phonenumber2", "CreatedTimestamp": "2019-08-09T21:35:21.445Z", "UpdatedTimestamp": "2019-08-12T21:44:07.591Z" } }

For more information, see Working with Phone Numbers in the Amazon Chime Administration Guide.

The following code example shows how to use update-proxy-session.

Amazon CLI

To update a proxy session

The following update-proxy-session example updates the proxy session capabilities.

aws chime update-proxy-session \ --voice-connector-id abcdef1ghij2klmno3pqr4 \ --proxy-session-id 123a4bc5-67d8-901e-2f3g-h4ghjk56789l \ --capabilities "Voice"

Output:

{ "ProxySession": { "VoiceConnectorId": "abcdef1ghij2klmno3pqr4", "ProxySessionId": "123a4bc5-67d8-901e-2f3g-h4ghjk56789l", "Status": "Open", "ExpiryMinutes": 60, "Capabilities": [ "Voice" ], "CreatedTimestamp": "2020-04-15T16:10:10.288Z", "UpdatedTimestamp": "2020-04-15T16:10:10.288Z", "Participants": [ { "PhoneNumber": "+12065550100", "ProxyPhoneNumber": "+19135550199" }, { "PhoneNumber": "+14015550101", "ProxyPhoneNumber": "+19135550199" } ] } }

For more information, see Proxy Phone Sessions in the Amazon Chime Developer Guide.

The following code example shows how to use update-room-membership.

Amazon CLI

To update a room membership

The following update-room-membership example modifies the role of the specified chat room member to Administrator.

aws chime update-room-membership \ --account-id 12a3456b-7c89-012d-3456-78901e23fg45 \ --room-id abcd1e2d-3e45-6789-01f2-3g45h67i890j \ --member-id 1ab2345c-67de-8901-f23g-45h678901j2k \ --role Administrator

Output:

{ "RoomMembership": { "RoomId": "abcd1e2d-3e45-6789-01f2-3g45h67i890j", "Member": { "MemberId": "1ab2345c-67de-8901-f23g-45h678901j2k", "MemberType": "User", "Email": "sofiamartinez@example.com", "FullName": "Sofia Martinez", "AccountId": "12a3456b-7c89-012d-3456-78901e23fg45" }, "Role": "Administrator", "InvitedBy": "arn:aws:iam::111122223333:user/admin", "UpdatedTimestamp": "2019-12-02T22:40:22.931Z" } }

For more information, see Creating a Chat Room in the Amazon Chime User Guide.

The following code example shows how to use update-room.

Amazon CLI

To update a chat room

The following update-room example modifies the name of the specified chat room.

aws chime update-room \ --account-id 12a3456b-7c89-012d-3456-78901e23fg45 \ --room-id abcd1e2d-3e45-6789-01f2-3g45h67i890j \ --name teamRoom

Output:

{ "Room": { "RoomId": "abcd1e2d-3e45-6789-01f2-3g45h67i890j", "Name": "teamRoom", "AccountId": "12a3456b-7c89-012d-3456-78901e23fg45", "CreatedBy": "arn:aws:iam::111122223333:user/alejandro", "CreatedTimestamp": "2019-12-02T22:29:31.549Z", "UpdatedTimestamp": "2019-12-02T22:33:19.310Z" } }

For more information, see Creating a Chat Room in the Amazon Chime User Guide.

  • For API details, see UpdateRoom in Amazon CLI Command Reference.

The following code example shows how to use update-user-settings.

Amazon CLI

To update user settings

The following update-user-settings example enables the specified user to make inbound and outbound calls and send and receive SMS messages.

aws chime update-user-settings \ --account-id 12a3456b-7c89-012d-3456-78901e23fg45 \ --user-id 1ab2345c-67de-8901-f23g-45h678901j2k \ --user-settings "Telephony={InboundCalling=true,OutboundCalling=true,SMS=true}"

This command produces no output.

For more information, see Managing User Phone Numbers in the Amazon Chime Administration Guide.

The following code example shows how to use update-user.

Amazon CLI

To update user details

This example updates the specified details for the specified user.

Command:

aws chime update-user \ --account-id a1b2c3d4-5678-90ab-cdef-11111EXAMPLE \ --user-id a1b2c3d4-5678-90ab-cdef-22222EXAMPLE \ --license-type "Basic"

Output:

{ "User": { "UserId": "a1b2c3d4-5678-90ab-cdef-22222EXAMPLE" } }
  • For API details, see UpdateUser in Amazon CLI Command Reference.

The following code example shows how to use update-voice-connector-group.

Amazon CLI

To update the details for an Amazon Chime Voice Connector group

The following update-voice-connector-group example updates the details of the specified Amazon Chime Voice Connector group.

aws chime update-voice-connector-group \ --voice-connector-group-id 123a456b-c7d8-90e1-fg23-4h567jkl8901 \ --name "newGroupName" \ --voice-connector-items VoiceConnectorId=abcdef1ghij2klmno3pqr4,Priority=1

Output:

{ "VoiceConnectorGroup": { "VoiceConnectorGroupId": "123a456b-c7d8-90e1-fg23-4h567jkl8901", "Name": "newGroupName", "VoiceConnectorItems": [ { "VoiceConnectorId": "abcdef1ghij2klmno3pqr4", "Priority": 1 } ], "CreatedTimestamp": "2019-09-18T16:38:34.734Z", "UpdatedTimestamp": "2019-10-28T19:00:57.081Z" } }

For more information, see Working with Amazon Chime Voice Connector Groups in the Amazon Chime Administration Guide.

The following code example shows how to use update-voice-connector.

Amazon CLI

To update the details for an Amazon Chime Voice Connector

The following update-voice-connector example updates the name of the specified Amazon Chime Voice Connector.

aws chime update-voice-connector \ --voice-connector-id abcdef1ghij2klmno3pqr4 \ --name newName \ --require-encryption

Output:

{ "VoiceConnector": { "VoiceConnectorId": "abcdef1ghij2klmno3pqr4", "AwsRegion": "us-west-2", "Name": "newName", "OutboundHostName": "abcdef1ghij2klmno3pqr4.voiceconnector.chime.aws", "RequireEncryption": true, "CreatedTimestamp": "2019-09-18T20:34:01.352Z", "UpdatedTimestamp": "2019-09-18T20:40:52.895Z" } }

For more information, see Working with Amazon Chime Voice Connectors in the Amazon Chime Administration Guide.