Connect

Table of Contents

Client

class Connect.Client

A low-level client representing Amazon Connect Service:

client = session.create_client('connect')

These are the available methods:

can_paginate(operation_name)

Check if an operation can be paginated.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Returns
True if the operation can be paginated, False otherwise.
generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)

Generate a presigned url given a client, its method, and arguments

Parameters
  • ClientMethod (string) -- The client method to presign for
  • Params (dict) -- The parameters normally passed to ClientMethod.
  • ExpiresIn (int) -- The number of seconds the presigned url is valid for. By default it expires in an hour (3600 seconds)
  • HttpMethod (string) -- The http method to use on the generated url. By default, the http method is whatever is used in the method's model.
Returns

The presigned url

get_paginator(operation_name)

Create a paginator for an operation.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Raises OperationNotPageableError
Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type
L{botocore.paginate.Paginator}
Returns
A paginator object.
get_waiter(waiter_name)

Returns an object that can wait for some condition.

Parameters
waiter_name (str) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
Returns
The specified waiter object.
Return type
botocore.waiter.Waiter
start_outbound_voice_contact(**kwargs)

The StartOutboundVoiceContact operation initiates a contact flow to place an outbound call to a customer.

There is a throttling limit placed on usage of the API that includes a RateLimit of 2 per second, and a BurstLimit of 5 per second.

If you are using an IAM account, it must have permissions to the connect:StartOutboundVoiceContact action.

See also: AWS API Documentation

Request Syntax

response = client.start_outbound_voice_contact(
    DestinationPhoneNumber='string',
    ContactFlowId='string',
    InstanceId='string',
    ClientToken='string',
    SourcePhoneNumber='string',
    QueueId='string',
    Attributes={
        'string': 'string'
    }
)
Parameters
  • DestinationPhoneNumber (string) --

    [REQUIRED]

    The phone number, in E.164 format, of the customer to call with the outbound contact.

  • ContactFlowId (string) --

    [REQUIRED]

    The identifier for the contact flow to execute for the outbound call. This is a GUID value only. Amazon Resource Name (ARN) values are not supported.

    To find the ContactFlowId , open the contact flow to use in the Amazon Connect contact flow designer. The ID for the contact flow is displayed in the address bar as part of the URL. For example, an address displayed when you open a contact flow is similar to the following: https://myconnectinstance.awsapps.com/connect/contact-flows/edit?id=arn:aws:connect:us-east-1:361814831152:instance/2fb42df9-78a2-4b99-b484-f5cf80dc300c/contact-flow/*b0b8f2dd-ed1b-4c44-af36-ce189a178181* `` . At the end of the URL, you see ``contact-flow/b0b8f2dd-ed1b-4c44-af36-ce189a178181 . The ContactFlowID for this contact flow is `` b0b8f2dd-ed1b-4c44-af36-ce189a178181 `` . Make sure to include only the GUID after the "contact-flow/" in your requests.

  • InstanceId (string) --

    [REQUIRED]

    The identifier for your Amazon Connect instance. To find the InstanceId value for your Amazon Connect instance, open the Amazon Connect console . Select the instance alias of the instance and view the instance ID in the Overview section. For example, the instance ID is the set of characters at the end of the instance ARN, after "instance/", such as 10a4c4eb-f57e-4d4c-b602-bf39176ced07.

  • ClientToken (string) --

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. The token is valid for 7 days after creation. If a contact is already started, the contact ID is returned. If the contact is disconnected, a new contact is started.

    This field is autopopulated if not provided.

  • SourcePhoneNumber (string) -- The phone number, in E.164 format, associated with your Amazon Connect instance to use to place the outbound call.
  • QueueId (string) --

    The queue to which to add the call. If you specify a queue, the phone displayed for caller ID is the phone number defined for the queue. If you do not specify a queue, the queue used is the queue defined in the contact flow specified by ContactFlowId .

    To find the QueueId , open the queue to use in the Amazon Connect queue editor. The ID for the queue is displayed in the address bar as part of the URL. For example, the QueueId value is the set of characters at the end of the URL, after "queue/", such as aeg40574-2d01-51c3-73d6-bf8624d2168c .

  • Attributes (dict) --

    Specify a custom key-value pair using an attribute map. The attributes are standard Amazon Connect attributes, and can be accessed in contact flows just like any other contact attributes.

    There can be up to 32,768 UTF-8 bytes across all key-value pairs. Attribute keys can include only alphanumeric, dash, and underscore characters.

    For example, to play a greeting when the customer answers the call, you can pass the customer name in attributes similar to the following:

    • (string) -- Key for the key value pair to be used for additional attributes.
      • (string) -- Value for the key value pair to be used for additional attributes.
Return type

dict

Returns

Response Syntax

{
    'ContactId': 'string'
}

Response Structure

  • (dict) --

    • ContactId (string) --

      The unique identifier of this contact within your Amazon Connect instance.

stop_contact(**kwargs)

Ends the contact initiated by the StartOutboundVoiceContact operation.

If you are using an IAM account, it must have permissions to the connect:StopContact operation.

See also: AWS API Documentation

Request Syntax

response = client.stop_contact(
    ContactId='string',
    InstanceId='string'
)
Parameters
  • ContactId (string) --

    [REQUIRED]

    The unique identifier of the contact to end. This is the ContactId value returned from the StartOutboundVoiceContact operation.

  • InstanceId (string) --

    [REQUIRED]

    The identifier of the Amazon Connect instance in which the contact is active.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Paginators

The available paginators are: