Connect / Client / update_task_template

update_task_template#

Connect.Client.update_task_template(**kwargs)#

Updates details about a specific task template in the specified Amazon Connect instance. This operation does not support partial updates. Instead it does a full update of template content.

See also: AWS API Documentation

Request Syntax

response = client.update_task_template(
    TaskTemplateId='string',
    InstanceId='string',
    Name='string',
    Description='string',
    ContactFlowId='string',
    Constraints={
        'RequiredFields': [
            {
                'Id': {
                    'Name': 'string'
                }
            },
        ],
        'ReadOnlyFields': [
            {
                'Id': {
                    'Name': 'string'
                }
            },
        ],
        'InvisibleFields': [
            {
                'Id': {
                    'Name': 'string'
                }
            },
        ]
    },
    Defaults={
        'DefaultFieldValues': [
            {
                'Id': {
                    'Name': 'string'
                },
                'DefaultValue': 'string'
            },
        ]
    },
    Status='ACTIVE'|'INACTIVE',
    Fields=[
        {
            'Id': {
                'Name': 'string'
            },
            'Description': 'string',
            'Type': 'NAME'|'DESCRIPTION'|'SCHEDULED_TIME'|'QUICK_CONNECT'|'URL'|'NUMBER'|'TEXT'|'TEXT_AREA'|'DATE_TIME'|'BOOLEAN'|'SINGLE_SELECT'|'EMAIL',
            'SingleSelectOptions': [
                'string',
            ]
        },
    ]
)
Parameters:
  • TaskTemplateId (string) –

    [REQUIRED]

    A unique identifier for the task template.

  • InstanceId (string) –

    [REQUIRED]

    The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

  • Name (string) – The name of the task template.

  • Description (string) – The description of the task template.

  • ContactFlowId (string) – The identifier of the flow that runs by default when a task is created by referencing this template.

  • Constraints (dict) –

    Constraints that are applicable to the fields listed.

    • RequiredFields (list) –

      Lists the fields that are required to be filled by agents.

      • (dict) –

        Information about a required field.

        • Id (dict) –

          The unique identifier for the field.

          • Name (string) –

            The name of the task template field.

    • ReadOnlyFields (list) –

      Lists the fields that are read-only to agents, and cannot be edited.

      • (dict) –

        Indicates a field that is read-only to an agent.

        • Id (dict) –

          Identifier of the read-only field.

          • Name (string) –

            The name of the task template field.

    • InvisibleFields (list) –

      Lists the fields that are invisible to agents.

      • (dict) –

        A field that is invisible to an agent.

        • Id (dict) –

          Identifier of the invisible field.

          • Name (string) –

            The name of the task template field.

  • Defaults (dict) –

    The default values for fields when a task is created by referencing this template.

    • DefaultFieldValues (list) –

      Default value for the field.

      • (dict) –

        Describes a default field and its corresponding value.

        • Id (dict) –

          Identifier of a field.

          • Name (string) –

            The name of the task template field.

        • DefaultValue (string) –

          Default value for the field.

  • Status (string) – Marks a template as ACTIVE or INACTIVE for a task to refer to it. Tasks can only be created from ACTIVE templates. If a template is marked as INACTIVE, then a task that refers to this template cannot be created.

  • Fields (list) –

    Fields that are part of the template.

    • (dict) –

      Describes a single task template field.

      • Id (dict) – [REQUIRED]

        The unique identifier for the field.

        • Name (string) –

          The name of the task template field.

      • Description (string) –

        The description of the field.

      • Type (string) –

        Indicates the type of field.

      • SingleSelectOptions (list) –

        A list of options for a single select field.

        • (string) –

Return type:

dict

Returns:

Response Syntax

{
    'InstanceId': 'string',
    'Id': 'string',
    'Arn': 'string',
    'Name': 'string',
    'Description': 'string',
    'ContactFlowId': 'string',
    'Constraints': {
        'RequiredFields': [
            {
                'Id': {
                    'Name': 'string'
                }
            },
        ],
        'ReadOnlyFields': [
            {
                'Id': {
                    'Name': 'string'
                }
            },
        ],
        'InvisibleFields': [
            {
                'Id': {
                    'Name': 'string'
                }
            },
        ]
    },
    'Defaults': {
        'DefaultFieldValues': [
            {
                'Id': {
                    'Name': 'string'
                },
                'DefaultValue': 'string'
            },
        ]
    },
    'Fields': [
        {
            'Id': {
                'Name': 'string'
            },
            'Description': 'string',
            'Type': 'NAME'|'DESCRIPTION'|'SCHEDULED_TIME'|'QUICK_CONNECT'|'URL'|'NUMBER'|'TEXT'|'TEXT_AREA'|'DATE_TIME'|'BOOLEAN'|'SINGLE_SELECT'|'EMAIL',
            'SingleSelectOptions': [
                'string',
            ]
        },
    ],
    'Status': 'ACTIVE'|'INACTIVE',
    'LastModifiedTime': datetime(2015, 1, 1),
    'CreatedTime': datetime(2015, 1, 1)
}

Response Structure

  • (dict) –

    • InstanceId (string) –

      The identifier of the Amazon Connect instance. You can find the instance ID in the Amazon Resource Name (ARN) of the instance.

    • Id (string) –

      The identifier of the task template resource.

    • Arn (string) –

      The Amazon Resource Name (ARN) for the task template resource.

    • Name (string) –

      The name of the task template.

    • Description (string) –

      The description of the task template.

    • ContactFlowId (string) –

      The identifier of the flow that runs by default when a task is created by referencing this template.

    • Constraints (dict) –

      Constraints that are applicable to the fields listed.

      • RequiredFields (list) –

        Lists the fields that are required to be filled by agents.

        • (dict) –

          Information about a required field.

          • Id (dict) –

            The unique identifier for the field.

            • Name (string) –

              The name of the task template field.

      • ReadOnlyFields (list) –

        Lists the fields that are read-only to agents, and cannot be edited.

        • (dict) –

          Indicates a field that is read-only to an agent.

          • Id (dict) –

            Identifier of the read-only field.

            • Name (string) –

              The name of the task template field.

      • InvisibleFields (list) –

        Lists the fields that are invisible to agents.

        • (dict) –

          A field that is invisible to an agent.

          • Id (dict) –

            Identifier of the invisible field.

            • Name (string) –

              The name of the task template field.

    • Defaults (dict) –

      The default values for fields when a task is created by referencing this template.

      • DefaultFieldValues (list) –

        Default value for the field.

        • (dict) –

          Describes a default field and its corresponding value.

          • Id (dict) –

            Identifier of a field.

            • Name (string) –

              The name of the task template field.

          • DefaultValue (string) –

            Default value for the field.

    • Fields (list) –

      Fields that are part of the template.

      • (dict) –

        Describes a single task template field.

        • Id (dict) –

          The unique identifier for the field.

          • Name (string) –

            The name of the task template field.

        • Description (string) –

          The description of the field.

        • Type (string) –

          Indicates the type of field.

        • SingleSelectOptions (list) –

          A list of options for a single select field.

          • (string) –

    • Status (string) –

      Marks a template as ACTIVE or INACTIVE for a task to refer to it. Tasks can only be created from ACTIVE templates. If a template is marked as INACTIVE, then a task that refers to this template cannot be created.

    • LastModifiedTime (datetime) –

      The timestamp when the task template was last modified.

    • CreatedTime (datetime) –

      The timestamp when the task template was created.

Exceptions

  • Connect.Client.exceptions.PropertyValidationException

  • Connect.Client.exceptions.InvalidParameterException

  • Connect.Client.exceptions.ResourceNotFoundException

  • Connect.Client.exceptions.ThrottlingException

  • Connect.Client.exceptions.ServiceQuotaExceededException

  • Connect.Client.exceptions.InternalServiceException