DevOpsAgentService / Client / create_trigger

create_trigger

DevOpsAgentService.Client.create_trigger(**kwargs)

Creates a new Trigger in the specified agent space

See also: AWS API Documentation

Request Syntax

response = client.create_trigger(
    agentSpaceId='string',
    type='string',
    condition={
        'schedule': {
            'expression': 'string'
        }
    },
    action={...}|[...]|123|123.4|'string'|True|None,
    status='string',
    clientToken='string'
)
Parameters:
  • agentSpaceId (string) –

    [REQUIRED]

    The unique identifier for the agent space where the Trigger will be created

  • type (string) –

    [REQUIRED]

    How the new Trigger fires

  • condition (dict) –

    [REQUIRED]

    The condition that fires the new Trigger

    Note

    This is a Tagged Union structure. Only one of the following top level keys can be set: schedule.

    • schedule (dict) –

      Time-based firing condition

      • expression (string) – [REQUIRED]

        The schedule expression

  • action (document) –

    [REQUIRED]

    The action the new Trigger performs when it fires

  • status (string) – The initial status of the Trigger

  • clientToken (string) –

    A unique, case-sensitive identifier used for idempotent Trigger creation

    This field is autopopulated if not provided.

Return type:

dict

Returns:

Response Syntax

{
    'trigger': {
        'triggerId': 'string',
        'agentSpaceId': 'string',
        'type': 'string',
        'condition': {
            'schedule': {
                'expression': 'string'
            }
        },
        'action': {...}|[...]|123|123.4|'string'|True|None,
        'status': 'string',
        'createdAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) –

    Response structure for creating a new Trigger

    • trigger (dict) –

      The Trigger object

      • triggerId (string) –

        The unique identifier for this Trigger

      • agentSpaceId (string) –

        The agent space this Trigger belongs to

      • type (string) –

        How this Trigger fires

      • condition (dict) –

        The condition that fires this Trigger

        Note

        This is a Tagged Union structure. Only one of the following top level keys will be set: schedule. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

        'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
        
        • schedule (dict) –

          Time-based firing condition

          • expression (string) –

            The schedule expression

      • action (document) –

        The action this Trigger performs when it fires

      • status (string) –

        The status of this Trigger

      • createdAt (datetime) –

        Timestamp when this Trigger was created

      • updatedAt (datetime) –

        Timestamp when this Trigger was last updated

Exceptions

  • DevOpsAgentService.Client.exceptions.ValidationException

  • DevOpsAgentService.Client.exceptions.ContentSizeExceededException

  • DevOpsAgentService.Client.exceptions.ServiceQuotaExceededException

  • DevOpsAgentService.Client.exceptions.ConflictException

  • DevOpsAgentService.Client.exceptions.InternalServerException

  • DevOpsAgentService.Client.exceptions.AccessDeniedException

  • DevOpsAgentService.Client.exceptions.ResourceNotFoundException

  • DevOpsAgentService.Client.exceptions.ThrottlingException

  • DevOpsAgentService.Client.exceptions.InvalidParameterException