Amazon Chime

2020/11/17 - Amazon Chime - 14 new 4 updated api methods

Changes  This release adds CRUD APIs for Amazon Chime SipMediaApplications and SipRules. It also adds the API for creating outbound PSTN calls for Amazon Chime meetings.

GetSipMediaApplication (new) Link ¶

Retrieves the information for a SIP media application, including name, AWS Region, and endpoints.

See also: AWS API Documentation

Request Syntax

client.get_sip_media_application(
    SipMediaApplicationId='string'
)
type SipMediaApplicationId

string

param SipMediaApplicationId

[REQUIRED]

The SIP media application ID.

rtype

dict

returns

Response Syntax

{
    'SipMediaApplication': {
        'SipMediaApplicationId': 'string',
        'AwsRegion': 'string',
        'Name': 'string',
        'Endpoints': [
            {
                'LambdaArn': 'string'
            },
        ],
        'CreatedTimestamp': datetime(2015, 1, 1),
        'UpdatedTimestamp': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • SipMediaApplication (dict) --

      The SIP media application details.

      • SipMediaApplicationId (string) --

        The SIP media application ID.

      • AwsRegion (string) --

        The AWS Region in which the SIP media application is created.

      • Name (string) --

        The name of the SIP media application.

      • Endpoints (list) --

        List of endpoints for SIP media application. Currently, only one endpoint per SIP media application is permitted.

        • (dict) --

          Endpoints to specify as part of a SIP media application.

          • LambdaArn (string) --

            Valid Amazon Resource Name (ARN) of the Lambda function of the same AWS Region where the SIP media application is created.

      • CreatedTimestamp (datetime) --

        The SIP media application creation timestamp, in ISO 8601 format.

      • UpdatedTimestamp (datetime) --

        The SIP media application updated timestamp, in ISO 8601 format.

DeleteSipRule (new) Link ¶

Deletes a SIP rule. You must disable a SIP rule before you can delete it.

See also: AWS API Documentation

Request Syntax

client.delete_sip_rule(
    SipRuleId='string'
)
type SipRuleId

string

param SipRuleId

[REQUIRED]

The SIP rule ID.

returns

None

CreateSipRule (new) Link ¶

Creates a SIP rule which can be used to run a SIP media application as a target for a specific trigger type.

See also: AWS API Documentation

Request Syntax

client.create_sip_rule(
    Name='string',
    TriggerType='ToPhoneNumber'|'RequestUriHostname',
    TriggerValue='string',
    Disabled=True|False,
    TargetApplications=[
        {
            'SipMediaApplicationId': 'string',
            'Priority': 123,
            'AwsRegion': 'string'
        },
    ]
)
type Name

string

param Name

[REQUIRED]

The name of the SIP rule.

type TriggerType

string

param TriggerType

[REQUIRED]

The type of trigger whose value is assigned to the SIP rule in TriggerValue . Allowed trigger values are RequestUriHostname and ToPhoneNumber .

type TriggerValue

string

param TriggerValue

[REQUIRED]

If TriggerType is RequestUriHostname then the value can be the outbound host name of an Amazon Chime Voice Connector. If TriggerType is ToPhoneNumber then the value can be a customer-owned phone number in E164 format. SipRule is triggered if the SIP application requests a host name, or a If TriggerType is RequestUriHostname , then the value can be the outbound hostname of an Amazon Chime Voice Connector. If TriggerType is ToPhoneNumber , then the value can be a customer-owned phone number in E164 format. SipRule is triggered if the SIP application requests a host name, or a ToPhoneNumber value matches the incoming SIP request.

type Disabled

boolean

param Disabled

Enables or disables a rule. You must disable rules before you can delete them.

type TargetApplications

list

param TargetApplications

[REQUIRED]

List of SIP media applications with priority and AWS Region. Only one SIP application per AWS Region can be used.

  • (dict) --

    Target SIP media application along with other details like priority and AWS Region to be specified in the SIP rule. Only one SIP rule per AWS Region can be provided.

    • SipMediaApplicationId (string) --

      The SIP media application ID.

    • Priority (integer) --

      Priority of the SIP media application in the target list.

    • AwsRegion (string) --

      AWS Region of target application.

rtype

dict

returns

Response Syntax

{
    'SipRule': {
        'SipRuleId': 'string',
        'Name': 'string',
        'Disabled': True|False,
        'TriggerType': 'ToPhoneNumber'|'RequestUriHostname',
        'TriggerValue': 'string',
        'TargetApplications': [
            {
                'SipMediaApplicationId': 'string',
                'Priority': 123,
                'AwsRegion': 'string'
            },
        ],
        'CreatedTimestamp': datetime(2015, 1, 1),
        'UpdatedTimestamp': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • SipRule (dict) --

      Returns the SIP rule information, including the rule ID, triggers, and target applications.

      • SipRuleId (string) --

        The SIP rule ID.

      • Name (string) --

        The name of the SIP rule.

      • Disabled (boolean) --

        Indicates if the SIP rule is enabled or disabled. You must disable a rule before you can delete it.

      • TriggerType (string) --

        The type of trigger whose value is assigned to the SIP rule in TriggerValue .

      • TriggerValue (string) --

        If TriggerType is RequestUriHostname , then the value can be the outbound host name of the Amazon Chime Voice Connector. If TriggerType is ToPhoneNumber , then the value can be a customer-owned phone number in E164 format. SipRule is triggered when a SIP rule requests host name or ToPhoneNumber matches in the incoming SIP request.

      • TargetApplications (list) --

        List of SIP media applications with priority and AWS Region. You can only use one SIP application per AWS Region and priority combination.

        • (dict) --

          Target SIP media application along with other details like priority and AWS Region to be specified in the SIP rule. Only one SIP rule per AWS Region can be provided.

          • SipMediaApplicationId (string) --

            The SIP media application ID.

          • Priority (integer) --

            Priority of the SIP media application in the target list.

          • AwsRegion (string) --

            AWS Region of target application.

      • CreatedTimestamp (datetime) --

        The SIP rule created timestamp, in ISO 8601 format.

      • UpdatedTimestamp (datetime) --

        The SIP rule updated timestamp, in ISO 8601 format.

CreateSipMediaApplicationCall (new) Link ¶

Creates an outbound call to a phone number from the phone number specified in the request, and it invokes the endpoint of the specified sipMediaApplicationId .

See also: AWS API Documentation

Request Syntax

client.create_sip_media_application_call(
    FromPhoneNumber='string',
    ToPhoneNumber='string',
    SipMediaApplicationId='string'
)
type FromPhoneNumber

string

param FromPhoneNumber

The phone number that a user calls from.

type ToPhoneNumber

string

param ToPhoneNumber

The phone number that the user dials in order to connect to a meeting

type SipMediaApplicationId

string

param SipMediaApplicationId

[REQUIRED]

The ID of the SIP media application.

rtype

dict

returns

Response Syntax

{
    'SipMediaApplicationCall': {
        'TransactionId': 'string'
    }
}

Response Structure

  • (dict) --

    • SipMediaApplicationCall (dict) --

      The actual call.

      • TransactionId (string) --

        The transaction ID of a call.

CreateMeetingDialOut (new) Link ¶

Uses the join token and call metadata in a meeting request (From number, To number, and so forth) to initiate an outbound call to a public switched telephone network (PSTN) and joins them into Chime meeting. Also ensures that the From number belongs to the customer.

To play welcome audio or implement an interactive voice response (IVR), use the CreateSipMediaApplicationCall API with the corresponding SIP media application ID.

See also: AWS API Documentation

Request Syntax

client.create_meeting_dial_out(
    MeetingId='string',
    FromPhoneNumber='string',
    ToPhoneNumber='string',
    JoinToken='string'
)
type MeetingId

string

param MeetingId

[REQUIRED]

The Amazon Chime SDK meeting ID.

Type: String

Pattern: [a-fA-F0-9]{8}(?:-[a-fA-F0-9]{4}){3}-[a-fA-F0-9]{12}

Required: No

type FromPhoneNumber

string

param FromPhoneNumber

[REQUIRED]

Phone number used as the caller ID when the remote party receives a call.

type ToPhoneNumber

string

param ToPhoneNumber

[REQUIRED]

Phone number called when inviting someone to a meeting.

type JoinToken

string

param JoinToken

[REQUIRED]

Token used by the Amazon Chime SDK attendee. Call the CreateAttendee API to get a join token.

rtype

dict

returns

Response Syntax

{
    'TransactionId': 'string'
}

Response Structure

  • (dict) --

    • TransactionId (string) --

      Unique ID that tracks API calls.

UpdateSipRule (new) Link ¶

Updates the details for the specified SIP rule.

See also: AWS API Documentation

Request Syntax

client.update_sip_rule(
    SipRuleId='string',
    Name='string',
    Disabled=True|False,
    TargetApplications=[
        {
            'SipMediaApplicationId': 'string',
            'Priority': 123,
            'AwsRegion': 'string'
        },
    ]
)
type SipRuleId

string

param SipRuleId

[REQUIRED]

The SIP rule ID.

type Name

string

param Name

[REQUIRED]

The new name for the specified SIP rule.

type Disabled

boolean

param Disabled

The new value specified to indicate whether the rule is disabled.

type TargetApplications

list

param TargetApplications

The new value of the list of target applications.

  • (dict) --

    Target SIP media application along with other details like priority and AWS Region to be specified in the SIP rule. Only one SIP rule per AWS Region can be provided.

    • SipMediaApplicationId (string) --

      The SIP media application ID.

    • Priority (integer) --

      Priority of the SIP media application in the target list.

    • AwsRegion (string) --

      AWS Region of target application.

rtype

dict

returns

Response Syntax

{
    'SipRule': {
        'SipRuleId': 'string',
        'Name': 'string',
        'Disabled': True|False,
        'TriggerType': 'ToPhoneNumber'|'RequestUriHostname',
        'TriggerValue': 'string',
        'TargetApplications': [
            {
                'SipMediaApplicationId': 'string',
                'Priority': 123,
                'AwsRegion': 'string'
            },
        ],
        'CreatedTimestamp': datetime(2015, 1, 1),
        'UpdatedTimestamp': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • SipRule (dict) --

      Updated SIP rule details.

      • SipRuleId (string) --

        The SIP rule ID.

      • Name (string) --

        The name of the SIP rule.

      • Disabled (boolean) --

        Indicates if the SIP rule is enabled or disabled. You must disable a rule before you can delete it.

      • TriggerType (string) --

        The type of trigger whose value is assigned to the SIP rule in TriggerValue .

      • TriggerValue (string) --

        If TriggerType is RequestUriHostname , then the value can be the outbound host name of the Amazon Chime Voice Connector. If TriggerType is ToPhoneNumber , then the value can be a customer-owned phone number in E164 format. SipRule is triggered when a SIP rule requests host name or ToPhoneNumber matches in the incoming SIP request.

      • TargetApplications (list) --

        List of SIP media applications with priority and AWS Region. You can only use one SIP application per AWS Region and priority combination.

        • (dict) --

          Target SIP media application along with other details like priority and AWS Region to be specified in the SIP rule. Only one SIP rule per AWS Region can be provided.

          • SipMediaApplicationId (string) --

            The SIP media application ID.

          • Priority (integer) --

            Priority of the SIP media application in the target list.

          • AwsRegion (string) --

            AWS Region of target application.

      • CreatedTimestamp (datetime) --

        The SIP rule created timestamp, in ISO 8601 format.

      • UpdatedTimestamp (datetime) --

        The SIP rule updated timestamp, in ISO 8601 format.

DeleteSipMediaApplication (new) Link ¶

Deletes a SIP media application.

See also: AWS API Documentation

Request Syntax

client.delete_sip_media_application(
    SipMediaApplicationId='string'
)
type SipMediaApplicationId

string

param SipMediaApplicationId

[REQUIRED]

The SIP media application ID.

returns

None

UpdateSipMediaApplication (new) Link ¶

Updates the details for the specified SIP media application.

See also: AWS API Documentation

Request Syntax

client.update_sip_media_application(
    SipMediaApplicationId='string',
    Name='string',
    Endpoints=[
        {
            'LambdaArn': 'string'
        },
    ]
)
type SipMediaApplicationId

string

param SipMediaApplicationId

[REQUIRED]

The SIP media application ID.

type Name

string

param Name

The new name for the specified SIP media application.

type Endpoints

list

param Endpoints

The new set of endpoints for the specified SIP media application.

  • (dict) --

    Endpoints to specify as part of a SIP media application.

    • LambdaArn (string) --

      Valid Amazon Resource Name (ARN) of the Lambda function of the same AWS Region where the SIP media application is created.

rtype

dict

returns

Response Syntax

{
    'SipMediaApplication': {
        'SipMediaApplicationId': 'string',
        'AwsRegion': 'string',
        'Name': 'string',
        'Endpoints': [
            {
                'LambdaArn': 'string'
            },
        ],
        'CreatedTimestamp': datetime(2015, 1, 1),
        'UpdatedTimestamp': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • SipMediaApplication (dict) --

      The updated SIP media application details.

      • SipMediaApplicationId (string) --

        The SIP media application ID.

      • AwsRegion (string) --

        The AWS Region in which the SIP media application is created.

      • Name (string) --

        The name of the SIP media application.

      • Endpoints (list) --

        List of endpoints for SIP media application. Currently, only one endpoint per SIP media application is permitted.

        • (dict) --

          Endpoints to specify as part of a SIP media application.

          • LambdaArn (string) --

            Valid Amazon Resource Name (ARN) of the Lambda function of the same AWS Region where the SIP media application is created.

      • CreatedTimestamp (datetime) --

        The SIP media application creation timestamp, in ISO 8601 format.

      • UpdatedTimestamp (datetime) --

        The SIP media application updated timestamp, in ISO 8601 format.

CreateSipMediaApplication (new) Link ¶

Creates a SIP media application.

See also: AWS API Documentation

Request Syntax

client.create_sip_media_application(
    AwsRegion='string',
    Name='string',
    Endpoints=[
        {
            'LambdaArn': 'string'
        },
    ]
)
type AwsRegion

string

param AwsRegion

[REQUIRED]

AWS Region assigned to the SIP media application.

type Name

string

param Name

The SIP media application name.

type Endpoints

list

param Endpoints

[REQUIRED]

List of endpoints (Lambda Amazon Resource Names) specified for the SIP media application. Currently, only one endpoint is supported.

  • (dict) --

    Endpoints to specify as part of a SIP media application.

    • LambdaArn (string) --

      Valid Amazon Resource Name (ARN) of the Lambda function of the same AWS Region where the SIP media application is created.

rtype

dict

returns

Response Syntax

{
    'SipMediaApplication': {
        'SipMediaApplicationId': 'string',
        'AwsRegion': 'string',
        'Name': 'string',
        'Endpoints': [
            {
                'LambdaArn': 'string'
            },
        ],
        'CreatedTimestamp': datetime(2015, 1, 1),
        'UpdatedTimestamp': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • SipMediaApplication (dict) --

      The Sip media application details.

      • SipMediaApplicationId (string) --

        The SIP media application ID.

      • AwsRegion (string) --

        The AWS Region in which the SIP media application is created.

      • Name (string) --

        The name of the SIP media application.

      • Endpoints (list) --

        List of endpoints for SIP media application. Currently, only one endpoint per SIP media application is permitted.

        • (dict) --

          Endpoints to specify as part of a SIP media application.

          • LambdaArn (string) --

            Valid Amazon Resource Name (ARN) of the Lambda function of the same AWS Region where the SIP media application is created.

      • CreatedTimestamp (datetime) --

        The SIP media application creation timestamp, in ISO 8601 format.

      • UpdatedTimestamp (datetime) --

        The SIP media application updated timestamp, in ISO 8601 format.

GetSipMediaApplicationLoggingConfiguration (new) Link ¶

Returns the logging configuration for the specified SIP media application.

See also: AWS API Documentation

Request Syntax

client.get_sip_media_application_logging_configuration(
    SipMediaApplicationId='string'
)
type SipMediaApplicationId

string

param SipMediaApplicationId

[REQUIRED]

The ID of the SIP media application.

rtype

dict

returns

Response Syntax

{
    'SipMediaApplicationLoggingConfiguration': {
        'EnableSipMediaApplicationMessageLogs': True|False
    }
}

Response Structure

  • (dict) --

    • SipMediaApplicationLoggingConfiguration (dict) --

      The actual logging configuration.

      • EnableSipMediaApplicationMessageLogs (boolean) --

        Enables application message logs for the SIP media application.

ListSipMediaApplications (new) Link ¶

Lists the SIP media applications under the administrator's AWS account.

See also: AWS API Documentation

Request Syntax

client.list_sip_media_applications(
    MaxResults=123,
    NextToken='string'
)
type MaxResults

integer

param MaxResults

The maximum number of results to return in a single call. Defaults to 100.

type NextToken

string

param NextToken

The token to use to retrieve the next page of results.

rtype

dict

returns

Response Syntax

{
    'SipMediaApplications': [
        {
            'SipMediaApplicationId': 'string',
            'AwsRegion': 'string',
            'Name': 'string',
            'Endpoints': [
                {
                    'LambdaArn': 'string'
                },
            ],
            'CreatedTimestamp': datetime(2015, 1, 1),
            'UpdatedTimestamp': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • SipMediaApplications (list) --

      List of SIP media applications and application details.

      • (dict) --

        The SIP media application details, including name and endpoints. An AWS account can have multiple SIP media applications.

        • SipMediaApplicationId (string) --

          The SIP media application ID.

        • AwsRegion (string) --

          The AWS Region in which the SIP media application is created.

        • Name (string) --

          The name of the SIP media application.

        • Endpoints (list) --

          List of endpoints for SIP media application. Currently, only one endpoint per SIP media application is permitted.

          • (dict) --

            Endpoints to specify as part of a SIP media application.

            • LambdaArn (string) --

              Valid Amazon Resource Name (ARN) of the Lambda function of the same AWS Region where the SIP media application is created.

        • CreatedTimestamp (datetime) --

          The SIP media application creation timestamp, in ISO 8601 format.

        • UpdatedTimestamp (datetime) --

          The SIP media application updated timestamp, in ISO 8601 format.

    • NextToken (string) --

      The token to use to retrieve the next page of results.

PutSipMediaApplicationLoggingConfiguration (new) Link ¶

Updates the logging configuration for the specified SIP media application.

See also: AWS API Documentation

Request Syntax

client.put_sip_media_application_logging_configuration(
    SipMediaApplicationId='string',
    SipMediaApplicationLoggingConfiguration={
        'EnableSipMediaApplicationMessageLogs': True|False
    }
)
type SipMediaApplicationId

string

param SipMediaApplicationId

[REQUIRED]

The ID of the specified SIP media application

type SipMediaApplicationLoggingConfiguration

dict

param SipMediaApplicationLoggingConfiguration

The actual logging configuration.

  • EnableSipMediaApplicationMessageLogs (boolean) --

    Enables application message logs for the SIP media application.

rtype

dict

returns

Response Syntax

{
    'SipMediaApplicationLoggingConfiguration': {
        'EnableSipMediaApplicationMessageLogs': True|False
    }
}

Response Structure

  • (dict) --

    • SipMediaApplicationLoggingConfiguration (dict) --

      The actual logging configuration.

      • EnableSipMediaApplicationMessageLogs (boolean) --

        Enables application message logs for the SIP media application.

GetSipRule (new) Link ¶

Retrieves the details of a SIP rule, such as the rule ID, name, triggers, and target endpoints.

See also: AWS API Documentation

Request Syntax

client.get_sip_rule(
    SipRuleId='string'
)
type SipRuleId

string

param SipRuleId

[REQUIRED]

The SIP rule ID.

rtype

dict

returns

Response Syntax

{
    'SipRule': {
        'SipRuleId': 'string',
        'Name': 'string',
        'Disabled': True|False,
        'TriggerType': 'ToPhoneNumber'|'RequestUriHostname',
        'TriggerValue': 'string',
        'TargetApplications': [
            {
                'SipMediaApplicationId': 'string',
                'Priority': 123,
                'AwsRegion': 'string'
            },
        ],
        'CreatedTimestamp': datetime(2015, 1, 1),
        'UpdatedTimestamp': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • SipRule (dict) --

      The SIP rule details.

      • SipRuleId (string) --

        The SIP rule ID.

      • Name (string) --

        The name of the SIP rule.

      • Disabled (boolean) --

        Indicates if the SIP rule is enabled or disabled. You must disable a rule before you can delete it.

      • TriggerType (string) --

        The type of trigger whose value is assigned to the SIP rule in TriggerValue .

      • TriggerValue (string) --

        If TriggerType is RequestUriHostname , then the value can be the outbound host name of the Amazon Chime Voice Connector. If TriggerType is ToPhoneNumber , then the value can be a customer-owned phone number in E164 format. SipRule is triggered when a SIP rule requests host name or ToPhoneNumber matches in the incoming SIP request.

      • TargetApplications (list) --

        List of SIP media applications with priority and AWS Region. You can only use one SIP application per AWS Region and priority combination.

        • (dict) --

          Target SIP media application along with other details like priority and AWS Region to be specified in the SIP rule. Only one SIP rule per AWS Region can be provided.

          • SipMediaApplicationId (string) --

            The SIP media application ID.

          • Priority (integer) --

            Priority of the SIP media application in the target list.

          • AwsRegion (string) --

            AWS Region of target application.

      • CreatedTimestamp (datetime) --

        The SIP rule created timestamp, in ISO 8601 format.

      • UpdatedTimestamp (datetime) --

        The SIP rule updated timestamp, in ISO 8601 format.

ListSipRules (new) Link ¶

Lists the SIP rules under the administrator's AWS account.

See also: AWS API Documentation

Request Syntax

client.list_sip_rules(
    SipMediaApplicationId='string',
    MaxResults=123,
    NextToken='string'
)
type SipMediaApplicationId

string

param SipMediaApplicationId

The SIP media application ID.

type MaxResults

integer

param MaxResults

The maximum number of results to return in a single call. Defaults to 100.

type NextToken

string

param NextToken

The token to use to retrieve the next page of results.

rtype

dict

returns

Response Syntax

{
    'SipRules': [
        {
            'SipRuleId': 'string',
            'Name': 'string',
            'Disabled': True|False,
            'TriggerType': 'ToPhoneNumber'|'RequestUriHostname',
            'TriggerValue': 'string',
            'TargetApplications': [
                {
                    'SipMediaApplicationId': 'string',
                    'Priority': 123,
                    'AwsRegion': 'string'
                },
            ],
            'CreatedTimestamp': datetime(2015, 1, 1),
            'UpdatedTimestamp': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • SipRules (list) --

      List of SIP rules and rule details.

      • (dict) --

        The SIP rule details, including name, triggers, and target applications. An AWS account can have multiple SIP rules.

        • SipRuleId (string) --

          The SIP rule ID.

        • Name (string) --

          The name of the SIP rule.

        • Disabled (boolean) --

          Indicates if the SIP rule is enabled or disabled. You must disable a rule before you can delete it.

        • TriggerType (string) --

          The type of trigger whose value is assigned to the SIP rule in TriggerValue .

        • TriggerValue (string) --

          If TriggerType is RequestUriHostname , then the value can be the outbound host name of the Amazon Chime Voice Connector. If TriggerType is ToPhoneNumber , then the value can be a customer-owned phone number in E164 format. SipRule is triggered when a SIP rule requests host name or ToPhoneNumber matches in the incoming SIP request.

        • TargetApplications (list) --

          List of SIP media applications with priority and AWS Region. You can only use one SIP application per AWS Region and priority combination.

          • (dict) --

            Target SIP media application along with other details like priority and AWS Region to be specified in the SIP rule. Only one SIP rule per AWS Region can be provided.

            • SipMediaApplicationId (string) --

              The SIP media application ID.

            • Priority (integer) --

              Priority of the SIP media application in the target list.

            • AwsRegion (string) --

              AWS Region of target application.

        • CreatedTimestamp (datetime) --

          The SIP rule created timestamp, in ISO 8601 format.

        • UpdatedTimestamp (datetime) --

          The SIP rule updated timestamp, in ISO 8601 format.

    • NextToken (string) --

      The token to use to retrieve the next page of results.

GetPhoneNumber (updated) Link ¶
Changes (response)
{'PhoneNumber': {'Associations': {'Name': {'SipRuleId'}}}}

Retrieves details for the specified phone number ID, such as associations, capabilities, and product type.

See also: AWS API Documentation

Request Syntax

client.get_phone_number(
    PhoneNumberId='string'
)
type PhoneNumberId

string

param PhoneNumberId

[REQUIRED]

The phone number ID.

rtype

dict

returns

Response Syntax

{
    'PhoneNumber': {
        'PhoneNumberId': 'string',
        'E164PhoneNumber': 'string',
        'Type': 'Local'|'TollFree',
        'ProductType': 'BusinessCalling'|'VoiceConnector',
        'Status': 'AcquireInProgress'|'AcquireFailed'|'Unassigned'|'Assigned'|'ReleaseInProgress'|'DeleteInProgress'|'ReleaseFailed'|'DeleteFailed',
        'Capabilities': {
            'InboundCall': True|False,
            'OutboundCall': True|False,
            'InboundSMS': True|False,
            'OutboundSMS': True|False,
            'InboundMMS': True|False,
            'OutboundMMS': True|False
        },
        'Associations': [
            {
                'Value': 'string',
                'Name': 'AccountId'|'UserId'|'VoiceConnectorId'|'VoiceConnectorGroupId'|'SipRuleId',
                'AssociatedTimestamp': datetime(2015, 1, 1)
            },
        ],
        'CallingName': 'string',
        'CallingNameStatus': 'Unassigned'|'UpdateInProgress'|'UpdateSucceeded'|'UpdateFailed',
        'CreatedTimestamp': datetime(2015, 1, 1),
        'UpdatedTimestamp': datetime(2015, 1, 1),
        'DeletionTimestamp': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • PhoneNumber (dict) --

      The phone number details.

      • PhoneNumberId (string) --

        The phone number ID.

      • E164PhoneNumber (string) --

        The phone number, in E.164 format.

      • Type (string) --

        The phone number type.

      • ProductType (string) --

        The phone number product type.

      • Status (string) --

        The phone number status.

      • Capabilities (dict) --

        The phone number capabilities.

        • InboundCall (boolean) --

          Allows or denies inbound calling for the specified phone number.

        • OutboundCall (boolean) --

          Allows or denies outbound calling for the specified phone number.

        • InboundSMS (boolean) --

          Allows or denies inbound SMS messaging for the specified phone number.

        • OutboundSMS (boolean) --

          Allows or denies outbound SMS messaging for the specified phone number.

        • InboundMMS (boolean) --

          Allows or denies inbound MMS messaging for the specified phone number.

        • OutboundMMS (boolean) --

          Allows or denies outbound MMS messaging for the specified phone number.

      • Associations (list) --

        The phone number associations.

        • (dict) --

          The phone number associations, such as Amazon Chime account ID, Amazon Chime user ID, Amazon Chime Voice Connector ID, or Amazon Chime Voice Connector group ID.

          • Value (string) --

            Contains the ID for the entity specified in Name.

          • Name (string) --

            Defines the association with an Amazon Chime account ID, user ID, Amazon Chime Voice Connector ID, or Amazon Chime Voice Connector group ID.

          • AssociatedTimestamp (datetime) --

            The timestamp of the phone number association, in ISO 8601 format.

      • CallingName (string) --

        The outbound calling name associated with the phone number.

      • CallingNameStatus (string) --

        The outbound calling name status.

      • CreatedTimestamp (datetime) --

        The phone number creation timestamp, in ISO 8601 format.

      • UpdatedTimestamp (datetime) --

        The updated phone number timestamp, in ISO 8601 format.

      • DeletionTimestamp (datetime) --

        The deleted phone number timestamp, in ISO 8601 format.

ListPhoneNumbers (updated) Link ¶
Changes (request, response)
Request
{'FilterName': {'SipRuleId'}}
Response
{'PhoneNumbers': {'Associations': {'Name': {'SipRuleId'}}}}

Lists the phone numbers for the specified Amazon Chime account, Amazon Chime user, Amazon Chime Voice Connector, or Amazon Chime Voice Connector group.

See also: AWS API Documentation

Request Syntax

client.list_phone_numbers(
    Status='AcquireInProgress'|'AcquireFailed'|'Unassigned'|'Assigned'|'ReleaseInProgress'|'DeleteInProgress'|'ReleaseFailed'|'DeleteFailed',
    ProductType='BusinessCalling'|'VoiceConnector',
    FilterName='AccountId'|'UserId'|'VoiceConnectorId'|'VoiceConnectorGroupId'|'SipRuleId',
    FilterValue='string',
    MaxResults=123,
    NextToken='string'
)
type Status

string

param Status

The phone number status.

type ProductType

string

param ProductType

The phone number product type.

type FilterName

string

param FilterName

The filter to use to limit the number of results.

type FilterValue

string

param FilterValue

The value to use for the filter.

type MaxResults

integer

param MaxResults

The maximum number of results to return in a single call.

type NextToken

string

param NextToken

The token to use to retrieve the next page of results.

rtype

dict

returns

Response Syntax

{
    'PhoneNumbers': [
        {
            'PhoneNumberId': 'string',
            'E164PhoneNumber': 'string',
            'Type': 'Local'|'TollFree',
            'ProductType': 'BusinessCalling'|'VoiceConnector',
            'Status': 'AcquireInProgress'|'AcquireFailed'|'Unassigned'|'Assigned'|'ReleaseInProgress'|'DeleteInProgress'|'ReleaseFailed'|'DeleteFailed',
            'Capabilities': {
                'InboundCall': True|False,
                'OutboundCall': True|False,
                'InboundSMS': True|False,
                'OutboundSMS': True|False,
                'InboundMMS': True|False,
                'OutboundMMS': True|False
            },
            'Associations': [
                {
                    'Value': 'string',
                    'Name': 'AccountId'|'UserId'|'VoiceConnectorId'|'VoiceConnectorGroupId'|'SipRuleId',
                    'AssociatedTimestamp': datetime(2015, 1, 1)
                },
            ],
            'CallingName': 'string',
            'CallingNameStatus': 'Unassigned'|'UpdateInProgress'|'UpdateSucceeded'|'UpdateFailed',
            'CreatedTimestamp': datetime(2015, 1, 1),
            'UpdatedTimestamp': datetime(2015, 1, 1),
            'DeletionTimestamp': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • PhoneNumbers (list) --

      The phone number details.

      • (dict) --

        A phone number used for Amazon Chime Business Calling or an Amazon Chime Voice Connector.

        • PhoneNumberId (string) --

          The phone number ID.

        • E164PhoneNumber (string) --

          The phone number, in E.164 format.

        • Type (string) --

          The phone number type.

        • ProductType (string) --

          The phone number product type.

        • Status (string) --

          The phone number status.

        • Capabilities (dict) --

          The phone number capabilities.

          • InboundCall (boolean) --

            Allows or denies inbound calling for the specified phone number.

          • OutboundCall (boolean) --

            Allows or denies outbound calling for the specified phone number.

          • InboundSMS (boolean) --

            Allows or denies inbound SMS messaging for the specified phone number.

          • OutboundSMS (boolean) --

            Allows or denies outbound SMS messaging for the specified phone number.

          • InboundMMS (boolean) --

            Allows or denies inbound MMS messaging for the specified phone number.

          • OutboundMMS (boolean) --

            Allows or denies outbound MMS messaging for the specified phone number.

        • Associations (list) --

          The phone number associations.

          • (dict) --

            The phone number associations, such as Amazon Chime account ID, Amazon Chime user ID, Amazon Chime Voice Connector ID, or Amazon Chime Voice Connector group ID.

            • Value (string) --

              Contains the ID for the entity specified in Name.

            • Name (string) --

              Defines the association with an Amazon Chime account ID, user ID, Amazon Chime Voice Connector ID, or Amazon Chime Voice Connector group ID.

            • AssociatedTimestamp (datetime) --

              The timestamp of the phone number association, in ISO 8601 format.

        • CallingName (string) --

          The outbound calling name associated with the phone number.

        • CallingNameStatus (string) --

          The outbound calling name status.

        • CreatedTimestamp (datetime) --

          The phone number creation timestamp, in ISO 8601 format.

        • UpdatedTimestamp (datetime) --

          The updated phone number timestamp, in ISO 8601 format.

        • DeletionTimestamp (datetime) --

          The deleted phone number timestamp, in ISO 8601 format.

    • NextToken (string) --

      The token to use to retrieve the next page of results.

RestorePhoneNumber (updated) Link ¶
Changes (response)
{'PhoneNumber': {'Associations': {'Name': {'SipRuleId'}}}}

Moves a phone number from the Deletion queue back into the phone number Inventory .

See also: AWS API Documentation

Request Syntax

client.restore_phone_number(
    PhoneNumberId='string'
)
type PhoneNumberId

string

param PhoneNumberId

[REQUIRED]

The phone number.

rtype

dict

returns

Response Syntax

{
    'PhoneNumber': {
        'PhoneNumberId': 'string',
        'E164PhoneNumber': 'string',
        'Type': 'Local'|'TollFree',
        'ProductType': 'BusinessCalling'|'VoiceConnector',
        'Status': 'AcquireInProgress'|'AcquireFailed'|'Unassigned'|'Assigned'|'ReleaseInProgress'|'DeleteInProgress'|'ReleaseFailed'|'DeleteFailed',
        'Capabilities': {
            'InboundCall': True|False,
            'OutboundCall': True|False,
            'InboundSMS': True|False,
            'OutboundSMS': True|False,
            'InboundMMS': True|False,
            'OutboundMMS': True|False
        },
        'Associations': [
            {
                'Value': 'string',
                'Name': 'AccountId'|'UserId'|'VoiceConnectorId'|'VoiceConnectorGroupId'|'SipRuleId',
                'AssociatedTimestamp': datetime(2015, 1, 1)
            },
        ],
        'CallingName': 'string',
        'CallingNameStatus': 'Unassigned'|'UpdateInProgress'|'UpdateSucceeded'|'UpdateFailed',
        'CreatedTimestamp': datetime(2015, 1, 1),
        'UpdatedTimestamp': datetime(2015, 1, 1),
        'DeletionTimestamp': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • PhoneNumber (dict) --

      The phone number details.

      • PhoneNumberId (string) --

        The phone number ID.

      • E164PhoneNumber (string) --

        The phone number, in E.164 format.

      • Type (string) --

        The phone number type.

      • ProductType (string) --

        The phone number product type.

      • Status (string) --

        The phone number status.

      • Capabilities (dict) --

        The phone number capabilities.

        • InboundCall (boolean) --

          Allows or denies inbound calling for the specified phone number.

        • OutboundCall (boolean) --

          Allows or denies outbound calling for the specified phone number.

        • InboundSMS (boolean) --

          Allows or denies inbound SMS messaging for the specified phone number.

        • OutboundSMS (boolean) --

          Allows or denies outbound SMS messaging for the specified phone number.

        • InboundMMS (boolean) --

          Allows or denies inbound MMS messaging for the specified phone number.

        • OutboundMMS (boolean) --

          Allows or denies outbound MMS messaging for the specified phone number.

      • Associations (list) --

        The phone number associations.

        • (dict) --

          The phone number associations, such as Amazon Chime account ID, Amazon Chime user ID, Amazon Chime Voice Connector ID, or Amazon Chime Voice Connector group ID.

          • Value (string) --

            Contains the ID for the entity specified in Name.

          • Name (string) --

            Defines the association with an Amazon Chime account ID, user ID, Amazon Chime Voice Connector ID, or Amazon Chime Voice Connector group ID.

          • AssociatedTimestamp (datetime) --

            The timestamp of the phone number association, in ISO 8601 format.

      • CallingName (string) --

        The outbound calling name associated with the phone number.

      • CallingNameStatus (string) --

        The outbound calling name status.

      • CreatedTimestamp (datetime) --

        The phone number creation timestamp, in ISO 8601 format.

      • UpdatedTimestamp (datetime) --

        The updated phone number timestamp, in ISO 8601 format.

      • DeletionTimestamp (datetime) --

        The deleted phone number timestamp, in ISO 8601 format.

UpdatePhoneNumber (updated) Link ¶
Changes (response)
{'PhoneNumber': {'Associations': {'Name': {'SipRuleId'}}}}

Updates phone number details, such as product type or calling name, for the specified phone number ID. You can update one phone number detail at a time. For example, you can update either the product type or the calling name in one action.

For toll-free numbers, you must use the Amazon Chime Voice Connector product type.

Updates to outbound calling names can take up to 72 hours to complete. Pending updates to outbound calling names must be complete before you can request another update.

See also: AWS API Documentation

Request Syntax

client.update_phone_number(
    PhoneNumberId='string',
    ProductType='BusinessCalling'|'VoiceConnector',
    CallingName='string'
)
type PhoneNumberId

string

param PhoneNumberId

[REQUIRED]

The phone number ID.

type ProductType

string

param ProductType

The product type.

type CallingName

string

param CallingName

The outbound calling name associated with the phone number.

rtype

dict

returns

Response Syntax

{
    'PhoneNumber': {
        'PhoneNumberId': 'string',
        'E164PhoneNumber': 'string',
        'Type': 'Local'|'TollFree',
        'ProductType': 'BusinessCalling'|'VoiceConnector',
        'Status': 'AcquireInProgress'|'AcquireFailed'|'Unassigned'|'Assigned'|'ReleaseInProgress'|'DeleteInProgress'|'ReleaseFailed'|'DeleteFailed',
        'Capabilities': {
            'InboundCall': True|False,
            'OutboundCall': True|False,
            'InboundSMS': True|False,
            'OutboundSMS': True|False,
            'InboundMMS': True|False,
            'OutboundMMS': True|False
        },
        'Associations': [
            {
                'Value': 'string',
                'Name': 'AccountId'|'UserId'|'VoiceConnectorId'|'VoiceConnectorGroupId'|'SipRuleId',
                'AssociatedTimestamp': datetime(2015, 1, 1)
            },
        ],
        'CallingName': 'string',
        'CallingNameStatus': 'Unassigned'|'UpdateInProgress'|'UpdateSucceeded'|'UpdateFailed',
        'CreatedTimestamp': datetime(2015, 1, 1),
        'UpdatedTimestamp': datetime(2015, 1, 1),
        'DeletionTimestamp': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • PhoneNumber (dict) --

      The updated phone number details.

      • PhoneNumberId (string) --

        The phone number ID.

      • E164PhoneNumber (string) --

        The phone number, in E.164 format.

      • Type (string) --

        The phone number type.

      • ProductType (string) --

        The phone number product type.

      • Status (string) --

        The phone number status.

      • Capabilities (dict) --

        The phone number capabilities.

        • InboundCall (boolean) --

          Allows or denies inbound calling for the specified phone number.

        • OutboundCall (boolean) --

          Allows or denies outbound calling for the specified phone number.

        • InboundSMS (boolean) --

          Allows or denies inbound SMS messaging for the specified phone number.

        • OutboundSMS (boolean) --

          Allows or denies outbound SMS messaging for the specified phone number.

        • InboundMMS (boolean) --

          Allows or denies inbound MMS messaging for the specified phone number.

        • OutboundMMS (boolean) --

          Allows or denies outbound MMS messaging for the specified phone number.

      • Associations (list) --

        The phone number associations.

        • (dict) --

          The phone number associations, such as Amazon Chime account ID, Amazon Chime user ID, Amazon Chime Voice Connector ID, or Amazon Chime Voice Connector group ID.

          • Value (string) --

            Contains the ID for the entity specified in Name.

          • Name (string) --

            Defines the association with an Amazon Chime account ID, user ID, Amazon Chime Voice Connector ID, or Amazon Chime Voice Connector group ID.

          • AssociatedTimestamp (datetime) --

            The timestamp of the phone number association, in ISO 8601 format.

      • CallingName (string) --

        The outbound calling name associated with the phone number.

      • CallingNameStatus (string) --

        The outbound calling name status.

      • CreatedTimestamp (datetime) --

        The phone number creation timestamp, in ISO 8601 format.

      • UpdatedTimestamp (datetime) --

        The updated phone number timestamp, in ISO 8601 format.

      • DeletionTimestamp (datetime) --

        The deleted phone number timestamp, in ISO 8601 format.