Alexa For Business

2019/06/28 - Alexa For Business - 4 updated api methods

Changes  Update alexaforbusiness client to latest version

CreateContact (updated) Link ¶
Changes (request)
{'PhoneNumbers': [{'Number': 'string', 'Type': 'MOBILE | WORK | HOME'}],
 'SipAddresses': [{'Type': 'WORK', 'Uri': 'string'}]}

Creates a contact with the specified details.

See also: AWS API Documentation

Request Syntax

client.create_contact(
    DisplayName='string',
    FirstName='string',
    LastName='string',
    PhoneNumber='string',
    PhoneNumbers=[
        {
            'Number': 'string',
            'Type': 'MOBILE'|'WORK'|'HOME'
        },
    ],
    SipAddresses=[
        {
            'Uri': 'string',
            'Type': 'WORK'
        },
    ],
    ClientRequestToken='string'
)
type DisplayName:

string

param DisplayName:

The name of the contact to display on the console.

type FirstName:

string

param FirstName:

[REQUIRED]

The first name of the contact that is used to call the contact on the device.

type LastName:

string

param LastName:

The last name of the contact that is used to call the contact on the device.

type PhoneNumber:

string

param PhoneNumber:

The phone number of the contact in E.164 format. The phone number type defaults to WORK. You can specify PhoneNumber or PhoneNumbers. We recommend that you use PhoneNumbers, which lets you specify the phone number type and multiple numbers.

type PhoneNumbers:

list

param PhoneNumbers:

The list of phone numbers for the contact.

  • (dict) --

    The phone number for the contact containing the raw number and phone number type.

    • Number (string) -- [REQUIRED]

      The raw value of the phone number.

    • Type (string) -- [REQUIRED]

      The type of the phone number.

type SipAddresses:

list

param SipAddresses:

The list of SIP addresses for the contact.

  • (dict) --

    The SIP address for the contact containing the URI and SIP address type.

    • Uri (string) -- [REQUIRED]

      The URI for the SIP address.

    • Type (string) -- [REQUIRED]

      The type of the SIP address.

type ClientRequestToken:

string

param ClientRequestToken:

A unique, user-specified identifier for this request that ensures idempotency.

This field is autopopulated if not provided.

rtype:

dict

returns:

Response Syntax

{
    'ContactArn': 'string'
}

Response Structure

  • (dict) --

    • ContactArn (string) --

      The ARN of the newly created address book.

GetContact (updated) Link ¶
Changes (response)
{'Contact': {'PhoneNumbers': [{'Number': 'string',
                               'Type': 'MOBILE | WORK | HOME'}],
             'SipAddresses': [{'Type': 'WORK', 'Uri': 'string'}]}}

Gets the contact details by the contact ARN.

See also: AWS API Documentation

Request Syntax

client.get_contact(
    ContactArn='string'
)
type ContactArn:

string

param ContactArn:

[REQUIRED]

The ARN of the contact for which to request details.

rtype:

dict

returns:

Response Syntax

{
    'Contact': {
        'ContactArn': 'string',
        'DisplayName': 'string',
        'FirstName': 'string',
        'LastName': 'string',
        'PhoneNumber': 'string',
        'PhoneNumbers': [
            {
                'Number': 'string',
                'Type': 'MOBILE'|'WORK'|'HOME'
            },
        ],
        'SipAddresses': [
            {
                'Uri': 'string',
                'Type': 'WORK'
            },
        ]
    }
}

Response Structure

  • (dict) --

    • Contact (dict) --

      The details of the requested contact.

      • ContactArn (string) --

        The ARN of the contact.

      • DisplayName (string) --

        The name of the contact to display on the console.

      • FirstName (string) --

        The first name of the contact, used to call the contact on the device.

      • LastName (string) --

        The last name of the contact, used to call the contact on the device.

      • PhoneNumber (string) --

        The phone number of the contact. The phone number type defaults to WORK. You can either specify PhoneNumber or PhoneNumbers. We recommend that you use PhoneNumbers, which lets you specify the phone number type and multiple numbers.

      • PhoneNumbers (list) --

        The list of phone numbers for the contact.

        • (dict) --

          The phone number for the contact containing the raw number and phone number type.

          • Number (string) --

            The raw value of the phone number.

          • Type (string) --

            The type of the phone number.

      • SipAddresses (list) --

        The list of SIP addresses for the contact.

        • (dict) --

          The SIP address for the contact containing the URI and SIP address type.

          • Uri (string) --

            The URI for the SIP address.

          • Type (string) --

            The type of the SIP address.

SearchContacts (updated) Link ¶
Changes (response)
{'Contacts': {'PhoneNumbers': [{'Number': 'string',
                                'Type': 'MOBILE | WORK | HOME'}],
              'SipAddresses': [{'Type': 'WORK', 'Uri': 'string'}]}}

Searches contacts and lists the ones that meet a set of filter and sort criteria.

See also: AWS API Documentation

Request Syntax

client.search_contacts(
    Filters=[
        {
            'Key': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    SortCriteria=[
        {
            'Key': 'string',
            'Value': 'ASC'|'DESC'
        },
    ],
    NextToken='string',
    MaxResults=123
)
type Filters:

list

param Filters:

The filters to use to list a specified set of address books. The supported filter keys are DisplayName, FirstName, LastName, and AddressBookArns.

  • (dict) --

    A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria.

    • Key (string) -- [REQUIRED]

      The key of a filter.

    • Values (list) -- [REQUIRED]

      The values of a filter.

      • (string) --

type SortCriteria:

list

param SortCriteria:

The sort order to use in listing the specified set of contacts. The supported sort keys are DisplayName, FirstName, and LastName.

  • (dict) --

    An object representing a sort criteria.

    • Key (string) -- [REQUIRED]

      The sort key of a sort object.

    • Value (string) -- [REQUIRED]

      The sort value of a sort object.

type NextToken:

string

param NextToken:

An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response only includes results beyond the token, up to the value specified by MaxResults.

type MaxResults:

integer

param MaxResults:

The maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.

rtype:

dict

returns:

Response Syntax

{
    'Contacts': [
        {
            'ContactArn': 'string',
            'DisplayName': 'string',
            'FirstName': 'string',
            'LastName': 'string',
            'PhoneNumber': 'string',
            'PhoneNumbers': [
                {
                    'Number': 'string',
                    'Type': 'MOBILE'|'WORK'|'HOME'
                },
            ],
            'SipAddresses': [
                {
                    'Uri': 'string',
                    'Type': 'WORK'
                },
            ]
        },
    ],
    'NextToken': 'string',
    'TotalCount': 123
}

Response Structure

  • (dict) --

    • Contacts (list) --

      The contacts that meet the specified set of filter criteria, in sort order.

      • (dict) --

        Information related to a contact.

        • ContactArn (string) --

          The ARN of the contact.

        • DisplayName (string) --

          The name of the contact to display on the console.

        • FirstName (string) --

          The first name of the contact, used to call the contact on the device.

        • LastName (string) --

          The last name of the contact, used to call the contact on the device.

        • PhoneNumber (string) --

          The phone number of the contact. The phone number type defaults to WORK. You can specify PhoneNumber or PhoneNumbers. We recommend that you use PhoneNumbers, which lets you specify the phone number type and multiple numbers.

        • PhoneNumbers (list) --

          The list of phone numbers for the contact.

          • (dict) --

            The phone number for the contact containing the raw number and phone number type.

            • Number (string) --

              The raw value of the phone number.

            • Type (string) --

              The type of the phone number.

        • SipAddresses (list) --

          The list of SIP addresses for the contact.

          • (dict) --

            The SIP address for the contact containing the URI and SIP address type.

            • Uri (string) --

              The URI for the SIP address.

            • Type (string) --

              The type of the SIP address.

    • NextToken (string) --

      The token returned to indicate that there is more data available.

    • TotalCount (integer) --

      The total number of contacts returned.

UpdateContact (updated) Link ¶
Changes (request)
{'PhoneNumbers': [{'Number': 'string', 'Type': 'MOBILE | WORK | HOME'}],
 'SipAddresses': [{'Type': 'WORK', 'Uri': 'string'}]}

Updates the contact details by the contact ARN.

See also: AWS API Documentation

Request Syntax

client.update_contact(
    ContactArn='string',
    DisplayName='string',
    FirstName='string',
    LastName='string',
    PhoneNumber='string',
    PhoneNumbers=[
        {
            'Number': 'string',
            'Type': 'MOBILE'|'WORK'|'HOME'
        },
    ],
    SipAddresses=[
        {
            'Uri': 'string',
            'Type': 'WORK'
        },
    ]
)
type ContactArn:

string

param ContactArn:

[REQUIRED]

The ARN of the contact to update.

type DisplayName:

string

param DisplayName:

The updated display name of the contact.

type FirstName:

string

param FirstName:

The updated first name of the contact.

type LastName:

string

param LastName:

The updated last name of the contact.

type PhoneNumber:

string

param PhoneNumber:

The updated phone number of the contact. The phone number type defaults to WORK. You can either specify PhoneNumber or PhoneNumbers. We recommend that you use PhoneNumbers, which lets you specify the phone number type and multiple numbers.

type PhoneNumbers:

list

param PhoneNumbers:

The list of phone numbers for the contact.

  • (dict) --

    The phone number for the contact containing the raw number and phone number type.

    • Number (string) -- [REQUIRED]

      The raw value of the phone number.

    • Type (string) -- [REQUIRED]

      The type of the phone number.

type SipAddresses:

list

param SipAddresses:

The list of SIP addresses for the contact.

  • (dict) --

    The SIP address for the contact containing the URI and SIP address type.

    • Uri (string) -- [REQUIRED]

      The URI for the SIP address.

    • Type (string) -- [REQUIRED]

      The type of the SIP address.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --