DevOpsAgentService / Client / get_trigger

get_trigger

DevOpsAgentService.Client.get_trigger(**kwargs)

Gets a Trigger from the specified agent space

See also: AWS API Documentation

Request Syntax

response = client.get_trigger(
    agentSpaceId='string',
    triggerId='string'
)
Parameters:
  • agentSpaceId (string) –

    [REQUIRED]

    The unique identifier for the agent space containing the Trigger

  • triggerId (string) –

    [REQUIRED]

    The unique identifier of the Trigger to retrieve

Return type:

dict

Returns:

Response Syntax

{
    'trigger': {
        'triggerId': 'string',
        'agentSpaceId': 'string',
        'type': 'string',
        'condition': {
            'schedule': {
                'expression': 'string',
                'spec': {
                    'cron': {
                        'expression': 'string'
                    },
                    'timeRange': {
                        'startAfter': 'string',
                        'startBefore': 'string',
                        'recurrence': {
                            'daily': {},
                            'weekly': {
                                'dayOfWeek': 'MONDAY'|'TUESDAY'|'WEDNESDAY'|'THURSDAY'|'FRIDAY'|'SATURDAY'|'SUNDAY'
                            },
                            'monthly': {
                                'dayOfMonth': 123
                            }
                        }
                    }
                }
            }
        },
        '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 getting a 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) –

          Schedule-based firing condition. On CreateTrigger supply exactly one of the schedule condition’s expression or spec.

          • expression (string) –

            EventBridge cron or rate expression. Required for existing request and response compatibility. For a structured schedule response, this is the expression derived by Backlog.

          • spec (dict) –

            Structured schedule source of truth (cron | timeRange). On CreateTrigger supply exactly one of spec or expression. Present in responses together with the derived expression for structured triggers.

            Note

            This is a Tagged Union structure. Only one of the following top level keys will be set: cron, timeRange. 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'}
            
            • cron (dict) –

              Runs on an EventBridge cron or rate cadence

              • expression (string) –

                EventBridge cron or rate expression that anchors the flexible window

            • timeRange (dict) –

              Runs within a recurring time-of-day window

              • startAfter (string) –

                Earliest time of day the trigger may fire

              • startBefore (string) –

                Latest time of day the trigger may fire

              • recurrence (dict) –

                How the window recurs

                Note

                This is a Tagged Union structure. Only one of the following top level keys will be set: daily, weekly, monthly. 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'}
                
                • daily (dict) –

                  The window recurs every day

                • weekly (dict) –

                  The window recurs once per week

                  • dayOfWeek (string) –

                    Day of week the window recurs on

                • monthly (dict) –

                  The window recurs once per month

                  • dayOfMonth (integer) –

                    Day of month the window recurs on

      • 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