EventBridgeScheduler

Client

class EventBridgeScheduler.Client

A low-level client representing Amazon EventBridge Scheduler

Amazon EventBridge Scheduler is a serverless scheduler that allows you to create, run, and manage tasks from one central, managed service. EventBridge Scheduler delivers your tasks reliably, with built-in mechanisms that adjust your schedules based on the availability of downstream targets. The following reference lists the available API actions, and data types for EventBridge Scheduler.

import boto3

client = boto3.client('scheduler')

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.
close()

Closes underlying endpoint connections.

create_schedule(**kwargs)

Creates the specified schedule.

See also: AWS API Documentation

Request Syntax

response = client.create_schedule(
    ClientToken='string',
    Description='string',
    EndDate=datetime(2015, 1, 1),
    FlexibleTimeWindow={
        'MaximumWindowInMinutes': 123,
        'Mode': 'OFF'|'FLEXIBLE'
    },
    GroupName='string',
    KmsKeyArn='string',
    Name='string',
    ScheduleExpression='string',
    ScheduleExpressionTimezone='string',
    StartDate=datetime(2015, 1, 1),
    State='ENABLED'|'DISABLED',
    Target={
        'Arn': 'string',
        'DeadLetterConfig': {
            'Arn': 'string'
        },
        'EcsParameters': {
            'CapacityProviderStrategy': [
                {
                    'base': 123,
                    'capacityProvider': 'string',
                    'weight': 123
                },
            ],
            'EnableECSManagedTags': True|False,
            'EnableExecuteCommand': True|False,
            'Group': 'string',
            'LaunchType': 'EC2'|'FARGATE'|'EXTERNAL',
            'NetworkConfiguration': {
                'awsvpcConfiguration': {
                    'AssignPublicIp': 'ENABLED'|'DISABLED',
                    'SecurityGroups': [
                        'string',
                    ],
                    'Subnets': [
                        'string',
                    ]
                }
            },
            'PlacementConstraints': [
                {
                    'expression': 'string',
                    'type': 'distinctInstance'|'memberOf'
                },
            ],
            'PlacementStrategy': [
                {
                    'field': 'string',
                    'type': 'random'|'spread'|'binpack'
                },
            ],
            'PlatformVersion': 'string',
            'PropagateTags': 'TASK_DEFINITION',
            'ReferenceId': 'string',
            'Tags': [
                {
                    'string': 'string'
                },
            ],
            'TaskCount': 123,
            'TaskDefinitionArn': 'string'
        },
        'EventBridgeParameters': {
            'DetailType': 'string',
            'Source': 'string'
        },
        'Input': 'string',
        'KinesisParameters': {
            'PartitionKey': 'string'
        },
        'RetryPolicy': {
            'MaximumEventAgeInSeconds': 123,
            'MaximumRetryAttempts': 123
        },
        'RoleArn': 'string',
        'SageMakerPipelineParameters': {
            'PipelineParameterList': [
                {
                    'Name': 'string',
                    'Value': 'string'
                },
            ]
        },
        'SqsParameters': {
            'MessageGroupId': 'string'
        }
    }
)
Parameters
  • ClientToken (string) --

    Unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you do not specify a client token, EventBridge Scheduler uses a randomly generated token for the request to ensure idempotency.

    This field is autopopulated if not provided.

  • Description (string) -- The description you specify for the schedule.
  • EndDate (datetime) -- The date, in UTC, before which the schedule can invoke its target. Depending on the schedule's recurrence expression, invocations might stop on, or before, the EndDate you specify. EventBridge Scheduler ignores EndDate for one-time schedules.
  • FlexibleTimeWindow (dict) --

    [REQUIRED]

    Allows you to configure a time window during which EventBridge Scheduler invokes the schedule.

    • MaximumWindowInMinutes (integer) --

      The maximum time window during which a schedule can be invoked.

    • Mode (string) -- [REQUIRED]

      Determines whether the schedule is invoked within a flexible time window.

  • GroupName (string) -- The name of the schedule group to associate with this schedule. If you omit this, the default schedule group is used.
  • KmsKeyArn (string) -- The Amazon Resource Name (ARN) for the customer managed KMS key that EventBridge Scheduler will use to encrypt and decrypt your data.
  • Name (string) --

    [REQUIRED]

    The name of the schedule that you are creating.

  • ScheduleExpression (string) --

    [REQUIRED]

    The expression that defines when the schedule runs. The following formats are supported.

    • at expression - at(yyyy-mm-ddThh:mm:ss)
    • rate expression - rate(unit value)
    • cron expression - cron(fields)

    You can use at expressions to create one-time schedules that invoke a target once, at the time and in the time zone, that you specify. You can use rate and cron expressions to create recurring schedules. Rate-based schedules are useful when you want to invoke a target at regular intervals, such as every 15 minutes or every five days. Cron-based schedules are useful when you want to invoke a target periodically at a specific time, such as at 8:00 am (UTC+0) every 1st day of the month.

    A cron expression consists of six fields separated by white spaces: (minutes hours day_of_month month day_of_week year) .

    A rate expression consists of a value as a positive integer, and a unit with the following options: minute | minutes | hour | hours | day | days

    For more information and examples, see Schedule types on EventBridge Scheduler in the EventBridge Scheduler User Guide .

  • ScheduleExpressionTimezone (string) -- The timezone in which the scheduling expression is evaluated.
  • StartDate (datetime) -- The date, in UTC, after which the schedule can begin invoking its target. Depending on the schedule's recurrence expression, invocations might occur on, or after, the StartDate you specify. EventBridge Scheduler ignores StartDate for one-time schedules.
  • State (string) -- Specifies whether the schedule is enabled or disabled.
  • Target (dict) --

    [REQUIRED]

    The schedule's target.

    • Arn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the target.

    • DeadLetterConfig (dict) --

      An object that contains information about an Amazon SQS queue that EventBridge Scheduler uses as a dead-letter queue for your schedule. If specified, EventBridge Scheduler delivers failed events that could not be successfully delivered to a target to the queue.

      • Arn (string) --

        The Amazon Resource Name (ARN) of the SQS queue specified as the destination for the dead-letter queue.

    • EcsParameters (dict) --

      The templated target type for the Amazon ECS RunTask API operation.

      • CapacityProviderStrategy (list) --

        The capacity provider strategy to use for the task.

        • (dict) --

          The details of a capacity provider strategy.

          • base (integer) --

            The base value designates how many tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined. If no value is specified, the default value of 0 is used.

          • capacityProvider (string) -- [REQUIRED]

            The short name of the capacity provider.

          • weight (integer) --

            The weight value designates the relative percentage of the total number of tasks launched that should use the specified capacity provider. The weight value is taken into consideration after the base value, if defined, is satisfied.

      • EnableECSManagedTags (boolean) --

        Specifies whether to enable Amazon ECS managed tags for the task. For more information, see Tagging Your Amazon ECS Resources in the Amazon ECS Developer Guide .

      • EnableExecuteCommand (boolean) --

        Whether or not to enable the execute command functionality for the containers in this task. If true, this enables execute command functionality on all containers in the task.

      • Group (string) --

        Specifies an ECS task group for the task. The maximum length is 255 characters.

      • LaunchType (string) --

        Specifies the launch type on which your task is running. The launch type that you specify here must match one of the launch type (compatibilities) of the target task. The FARGATE value is supported only in the Regions where Fargate with Amazon ECS is supported. For more information, see AWS Fargate on Amazon ECS in the Amazon ECS Developer Guide .

      • NetworkConfiguration (dict) --

        This structure specifies the network configuration for an ECS task.

        • awsvpcConfiguration (dict) --

          Specifies the Amazon VPC subnets and security groups for the task, and whether a public IP address is to be used. This structure is relevant only for ECS tasks that use the awsvpc network mode.

          • AssignPublicIp (string) --

            Specifies whether the task's elastic network interface receives a public IP address. You can specify ENABLED only when LaunchType in EcsParameters is set to FARGATE .

          • SecurityGroups (list) --

            Specifies the security groups associated with the task. These security groups must all be in the same VPC. You can specify as many as five security groups. If you do not specify a security group, the default security group for the VPC is used.

            • (string) --
          • Subnets (list) -- [REQUIRED]

            Specifies the subnets associated with the task. These subnets must all be in the same VPC. You can specify as many as 16 subnets.

            • (string) --
      • PlacementConstraints (list) --

        An array of placement constraint objects to use for the task. You can specify up to 10 constraints per task (including constraints in the task definition and those specified at runtime).

        • (dict) --

          An object representing a constraint on task placement.

          • expression (string) --

            A cluster query language expression to apply to the constraint. You cannot specify an expression if the constraint type is distinctInstance . For more information, see Cluster query language in the Amazon ECS Developer Guide .

          • type (string) --

            The type of constraint. Use distinctInstance to ensure that each task in a particular group is running on a different container instance. Use memberOf to restrict the selection to a group of valid candidates.

      • PlacementStrategy (list) --

        The task placement strategy for a task or service.

        • (dict) --

          The task placement strategy for a task or service.

          • field (string) --

            The field to apply the placement strategy against. For the spread placement strategy, valid values are instanceId (or instanceId , which has the same effect), or any platform or custom attribute that is applied to a container instance, such as attribute:ecs.availability-zone . For the binpack placement strategy, valid values are cpu and memory . For the random placement strategy, this field is not used.

          • type (string) --

            The type of placement strategy. The random placement strategy randomly places tasks on available candidates. The spread placement strategy spreads placement across available candidates evenly based on the field parameter. The binpack strategy places tasks on available candidates that have the least available amount of the resource that is specified with the field parameter. For example, if you binpack on memory, a task is placed on the instance with the least amount of remaining memory (but still enough to run the task).

      • PlatformVersion (string) --

        Specifies the platform version for the task. Specify only the numeric portion of the platform version, such as 1.1.0 .

      • PropagateTags (string) --

        Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags are not propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task creation, use Amazon ECS's TagResource API action.

      • ReferenceId (string) --

        The reference ID to use for the task.

      • Tags (list) --

        The metadata that you apply to the task to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. For more information, see RunTask in the Amazon ECS API Reference .

        • (dict) --
          • (string) --
            • (string) --
      • TaskCount (integer) --

        The number of tasks to create based on TaskDefinition . The default is 1 .

      • TaskDefinitionArn (string) -- [REQUIRED]

        The Amazon Resource Name (ARN) of the task definition to use if the event target is an Amazon ECS task.

    • EventBridgeParameters (dict) --

      The templated target type for the EventBridge PutEvents API operation.

      • DetailType (string) -- [REQUIRED]

        A free-form string, with a maximum of 128 characters, used to decide what fields to expect in the event detail.

      • Source (string) -- [REQUIRED]

        The source of the event.

    • Input (string) --

      The text, or well-formed JSON, passed to the target. If you are configuring a templated Lambda, AWS Step Functions, or Amazon EventBridge target, the input must be a well-formed JSON. For all other target types, a JSON is not required. If you do not specify anything for this field, EventBridge Scheduler delivers a default notification to the target.

    • KinesisParameters (dict) --

      The templated target type for the Amazon Kinesis PutRecord API operation.

    • RetryPolicy (dict) --

      A RetryPolicy object that includes information about the retry policy settings, including the maximum age of an event, and the maximum number of times EventBridge Scheduler will try to deliver the event to a target.

      • MaximumEventAgeInSeconds (integer) --

        The maximum amount of time, in seconds, to continue to make retry attempts.

      • MaximumRetryAttempts (integer) --

        The maximum number of retry attempts to make before the request fails. Retry attempts with exponential backoff continue until either the maximum number of attempts is made or until the duration of the MaximumEventAgeInSeconds is reached.

    • RoleArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the IAM role that EventBridge Scheduler will use for this target when the schedule is invoked.

    • SageMakerPipelineParameters (dict) --

      The templated target type for the Amazon SageMaker StartPipelineExecution API operation.

      • PipelineParameterList (list) --

        List of parameter names and values to use when executing the SageMaker Model Building Pipeline.

        • (dict) --

          The name and value pair of a parameter to use to start execution of a SageMaker Model Building Pipeline.

          • Name (string) -- [REQUIRED]

            Name of parameter to start execution of a SageMaker Model Building Pipeline.

          • Value (string) -- [REQUIRED]

            Value of parameter to start execution of a SageMaker Model Building Pipeline.

    • SqsParameters (dict) --

      The templated target type for the Amazon SQS SendMessage API operation. Contains the message group ID to use when the target is a FIFO queue. If you specify an Amazon SQS FIFO queue as a target, the queue must have content-based deduplication enabled. For more information, see Using the Amazon SQS message deduplication ID in the Amazon SQS Developer Guide .

      • MessageGroupId (string) --

        The FIFO message group ID to use as the target.

Return type

dict

Returns

Response Syntax

{
    'ScheduleArn': 'string'
}

Response Structure

  • (dict) --

    • ScheduleArn (string) --

      The Amazon Resource Name (ARN) of the schedule.

Exceptions

  • EventBridgeScheduler.Client.exceptions.ServiceQuotaExceededException
  • EventBridgeScheduler.Client.exceptions.ValidationException
  • EventBridgeScheduler.Client.exceptions.InternalServerException
  • EventBridgeScheduler.Client.exceptions.ConflictException
  • EventBridgeScheduler.Client.exceptions.ResourceNotFoundException
  • EventBridgeScheduler.Client.exceptions.ThrottlingException
create_schedule_group(**kwargs)

Creates the specified schedule group.

See also: AWS API Documentation

Request Syntax

response = client.create_schedule_group(
    ClientToken='string',
    Name='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • ClientToken (string) --

    Unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you do not specify a client token, EventBridge Scheduler uses a randomly generated token for the request to ensure idempotency.

    This field is autopopulated if not provided.

  • Name (string) --

    [REQUIRED]

    The name of the schedule group that you are creating.

  • Tags (list) --

    The list of tags to associate with the schedule group.

    • (dict) --

      Tag to associate with a schedule group.

      • Key (string) -- [REQUIRED]

        The key for the tag.

      • Value (string) -- [REQUIRED]

        The value for the tag.

Return type

dict

Returns

Response Syntax

{
    'ScheduleGroupArn': 'string'
}

Response Structure

  • (dict) --

    • ScheduleGroupArn (string) --

      The Amazon Resource Name (ARN) of the schedule group.

Exceptions

  • EventBridgeScheduler.Client.exceptions.ServiceQuotaExceededException
  • EventBridgeScheduler.Client.exceptions.ValidationException
  • EventBridgeScheduler.Client.exceptions.InternalServerException
  • EventBridgeScheduler.Client.exceptions.ConflictException
  • EventBridgeScheduler.Client.exceptions.ThrottlingException
delete_schedule(**kwargs)

Deletes the specified schedule.

See also: AWS API Documentation

Request Syntax

response = client.delete_schedule(
    ClientToken='string',
    GroupName='string',
    Name='string'
)
Parameters
  • ClientToken (string) --

    Unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you do not specify a client token, EventBridge Scheduler uses a randomly generated token for the request to ensure idempotency.

    This field is autopopulated if not provided.

  • GroupName (string) -- The name of the schedule group associated with this schedule. If you omit this, the default schedule group is used.
  • Name (string) --

    [REQUIRED]

    The name of the schedule to delete.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • EventBridgeScheduler.Client.exceptions.ValidationException
  • EventBridgeScheduler.Client.exceptions.InternalServerException
  • EventBridgeScheduler.Client.exceptions.ConflictException
  • EventBridgeScheduler.Client.exceptions.ResourceNotFoundException
  • EventBridgeScheduler.Client.exceptions.ThrottlingException
delete_schedule_group(**kwargs)

Deletes the specified schedule group. Deleting a schedule group results in EventBridge Scheduler deleting all schedules associated with the group. When you delete a group, it remains in a DELETING state until all of its associated schedules are deleted. Schedules associated with the group that are set to run while the schedule group is in the process of being deleted might continue to invoke their targets until the schedule group and its associated schedules are deleted.

Note

This operation is eventually consistent.

See also: AWS API Documentation

Request Syntax

response = client.delete_schedule_group(
    ClientToken='string',
    Name='string'
)
Parameters
  • ClientToken (string) --

    Unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you do not specify a client token, EventBridge Scheduler uses a randomly generated token for the request to ensure idempotency.

    This field is autopopulated if not provided.

  • Name (string) --

    [REQUIRED]

    The name of the schedule group to delete.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • EventBridgeScheduler.Client.exceptions.ValidationException
  • EventBridgeScheduler.Client.exceptions.InternalServerException
  • EventBridgeScheduler.Client.exceptions.ConflictException
  • EventBridgeScheduler.Client.exceptions.ResourceNotFoundException
  • EventBridgeScheduler.Client.exceptions.ThrottlingException
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_schedule(**kwargs)

Retrieves the specified schedule.

See also: AWS API Documentation

Request Syntax

response = client.get_schedule(
    GroupName='string',
    Name='string'
)
Parameters
  • GroupName (string) -- The name of the schedule group associated with this schedule. If you omit this, EventBridge Scheduler assumes that the schedule is associated with the default group.
  • Name (string) --

    [REQUIRED]

    The name of the schedule to retrieve.

Return type

dict

Returns

Response Syntax

{
    'Arn': 'string',
    'CreationDate': datetime(2015, 1, 1),
    'Description': 'string',
    'EndDate': datetime(2015, 1, 1),
    'FlexibleTimeWindow': {
        'MaximumWindowInMinutes': 123,
        'Mode': 'OFF'|'FLEXIBLE'
    },
    'GroupName': 'string',
    'KmsKeyArn': 'string',
    'LastModificationDate': datetime(2015, 1, 1),
    'Name': 'string',
    'ScheduleExpression': 'string',
    'ScheduleExpressionTimezone': 'string',
    'StartDate': datetime(2015, 1, 1),
    'State': 'ENABLED'|'DISABLED',
    'Target': {
        'Arn': 'string',
        'DeadLetterConfig': {
            'Arn': 'string'
        },
        'EcsParameters': {
            'CapacityProviderStrategy': [
                {
                    'base': 123,
                    'capacityProvider': 'string',
                    'weight': 123
                },
            ],
            'EnableECSManagedTags': True|False,
            'EnableExecuteCommand': True|False,
            'Group': 'string',
            'LaunchType': 'EC2'|'FARGATE'|'EXTERNAL',
            'NetworkConfiguration': {
                'awsvpcConfiguration': {
                    'AssignPublicIp': 'ENABLED'|'DISABLED',
                    'SecurityGroups': [
                        'string',
                    ],
                    'Subnets': [
                        'string',
                    ]
                }
            },
            'PlacementConstraints': [
                {
                    'expression': 'string',
                    'type': 'distinctInstance'|'memberOf'
                },
            ],
            'PlacementStrategy': [
                {
                    'field': 'string',
                    'type': 'random'|'spread'|'binpack'
                },
            ],
            'PlatformVersion': 'string',
            'PropagateTags': 'TASK_DEFINITION',
            'ReferenceId': 'string',
            'Tags': [
                {
                    'string': 'string'
                },
            ],
            'TaskCount': 123,
            'TaskDefinitionArn': 'string'
        },
        'EventBridgeParameters': {
            'DetailType': 'string',
            'Source': 'string'
        },
        'Input': 'string',
        'KinesisParameters': {
            'PartitionKey': 'string'
        },
        'RetryPolicy': {
            'MaximumEventAgeInSeconds': 123,
            'MaximumRetryAttempts': 123
        },
        'RoleArn': 'string',
        'SageMakerPipelineParameters': {
            'PipelineParameterList': [
                {
                    'Name': 'string',
                    'Value': 'string'
                },
            ]
        },
        'SqsParameters': {
            'MessageGroupId': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • Arn (string) --

      The Amazon Resource Name (ARN) of the schedule.

    • CreationDate (datetime) --

      The time at which the schedule was created.

    • Description (string) --

      The description of the schedule.

    • EndDate (datetime) --

      The date, in UTC, before which the schedule can invoke its target. Depending on the schedule's recurrence expression, invocations might stop on, or before, the EndDate you specify. EventBridge Scheduler ignores EndDate for one-time schedules.

    • FlexibleTimeWindow (dict) --

      Allows you to configure a time window during which EventBridge Scheduler invokes the schedule.

      • MaximumWindowInMinutes (integer) --

        The maximum time window during which a schedule can be invoked.

      • Mode (string) --

        Determines whether the schedule is invoked within a flexible time window.

    • GroupName (string) --

      The name of the schedule group associated with this schedule.

    • KmsKeyArn (string) --

      The ARN for a customer managed KMS Key that is be used to encrypt and decrypt your data.

    • LastModificationDate (datetime) --

      The time at which the schedule was last modified.

    • Name (string) --

      The name of the schedule.

    • ScheduleExpression (string) --

      The expression that defines when the schedule runs. The following formats are supported.

      • at expression - at(yyyy-mm-ddThh:mm:ss)
      • rate expression - rate(unit value)
      • cron expression - cron(fields)

      You can use at expressions to create one-time schedules that invoke a target once, at the time and in the time zone, that you specify. You can use rate and cron expressions to create recurring schedules. Rate-based schedules are useful when you want to invoke a target at regular intervals, such as every 15 minutes or every five days. Cron-based schedules are useful when you want to invoke a target periodically at a specific time, such as at 8:00 am (UTC+0) every 1st day of the month.

      A cron expression consists of six fields separated by white spaces: (minutes hours day_of_month month day_of_week year) .

      A rate expression consists of a value as a positive integer, and a unit with the following options: minute | minutes | hour | hours | day | days

      For more information and examples, see Schedule types on EventBridge Scheduler in the EventBridge Scheduler User Guide .

    • ScheduleExpressionTimezone (string) --

      The timezone in which the scheduling expression is evaluated.

    • StartDate (datetime) --

      The date, in UTC, after which the schedule can begin invoking its target. Depending on the schedule's recurrence expression, invocations might occur on, or after, the StartDate you specify. EventBridge Scheduler ignores StartDate for one-time schedules.

    • State (string) --

      Specifies whether the schedule is enabled or disabled.

    • Target (dict) --

      The schedule target.

      • Arn (string) --

        The Amazon Resource Name (ARN) of the target.

      • DeadLetterConfig (dict) --

        An object that contains information about an Amazon SQS queue that EventBridge Scheduler uses as a dead-letter queue for your schedule. If specified, EventBridge Scheduler delivers failed events that could not be successfully delivered to a target to the queue.

        • Arn (string) --

          The Amazon Resource Name (ARN) of the SQS queue specified as the destination for the dead-letter queue.

      • EcsParameters (dict) --

        The templated target type for the Amazon ECS RunTask API operation.

        • CapacityProviderStrategy (list) --

          The capacity provider strategy to use for the task.

          • (dict) --

            The details of a capacity provider strategy.

            • base (integer) --

              The base value designates how many tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined. If no value is specified, the default value of 0 is used.

            • capacityProvider (string) --

              The short name of the capacity provider.

            • weight (integer) --

              The weight value designates the relative percentage of the total number of tasks launched that should use the specified capacity provider. The weight value is taken into consideration after the base value, if defined, is satisfied.

        • EnableECSManagedTags (boolean) --

          Specifies whether to enable Amazon ECS managed tags for the task. For more information, see Tagging Your Amazon ECS Resources in the Amazon ECS Developer Guide .

        • EnableExecuteCommand (boolean) --

          Whether or not to enable the execute command functionality for the containers in this task. If true, this enables execute command functionality on all containers in the task.

        • Group (string) --

          Specifies an ECS task group for the task. The maximum length is 255 characters.

        • LaunchType (string) --

          Specifies the launch type on which your task is running. The launch type that you specify here must match one of the launch type (compatibilities) of the target task. The FARGATE value is supported only in the Regions where Fargate with Amazon ECS is supported. For more information, see AWS Fargate on Amazon ECS in the Amazon ECS Developer Guide .

        • NetworkConfiguration (dict) --

          This structure specifies the network configuration for an ECS task.

          • awsvpcConfiguration (dict) --

            Specifies the Amazon VPC subnets and security groups for the task, and whether a public IP address is to be used. This structure is relevant only for ECS tasks that use the awsvpc network mode.

            • AssignPublicIp (string) --

              Specifies whether the task's elastic network interface receives a public IP address. You can specify ENABLED only when LaunchType in EcsParameters is set to FARGATE .

            • SecurityGroups (list) --

              Specifies the security groups associated with the task. These security groups must all be in the same VPC. You can specify as many as five security groups. If you do not specify a security group, the default security group for the VPC is used.

              • (string) --
            • Subnets (list) --

              Specifies the subnets associated with the task. These subnets must all be in the same VPC. You can specify as many as 16 subnets.

              • (string) --
        • PlacementConstraints (list) --

          An array of placement constraint objects to use for the task. You can specify up to 10 constraints per task (including constraints in the task definition and those specified at runtime).

          • (dict) --

            An object representing a constraint on task placement.

            • expression (string) --

              A cluster query language expression to apply to the constraint. You cannot specify an expression if the constraint type is distinctInstance . For more information, see Cluster query language in the Amazon ECS Developer Guide .

            • type (string) --

              The type of constraint. Use distinctInstance to ensure that each task in a particular group is running on a different container instance. Use memberOf to restrict the selection to a group of valid candidates.

        • PlacementStrategy (list) --

          The task placement strategy for a task or service.

          • (dict) --

            The task placement strategy for a task or service.

            • field (string) --

              The field to apply the placement strategy against. For the spread placement strategy, valid values are instanceId (or instanceId , which has the same effect), or any platform or custom attribute that is applied to a container instance, such as attribute:ecs.availability-zone . For the binpack placement strategy, valid values are cpu and memory . For the random placement strategy, this field is not used.

            • type (string) --

              The type of placement strategy. The random placement strategy randomly places tasks on available candidates. The spread placement strategy spreads placement across available candidates evenly based on the field parameter. The binpack strategy places tasks on available candidates that have the least available amount of the resource that is specified with the field parameter. For example, if you binpack on memory, a task is placed on the instance with the least amount of remaining memory (but still enough to run the task).

        • PlatformVersion (string) --

          Specifies the platform version for the task. Specify only the numeric portion of the platform version, such as 1.1.0 .

        • PropagateTags (string) --

          Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags are not propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task creation, use Amazon ECS's TagResource API action.

        • ReferenceId (string) --

          The reference ID to use for the task.

        • Tags (list) --

          The metadata that you apply to the task to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. For more information, see RunTask in the Amazon ECS API Reference .

          • (dict) --
            • (string) --
              • (string) --
        • TaskCount (integer) --

          The number of tasks to create based on TaskDefinition . The default is 1 .

        • TaskDefinitionArn (string) --

          The Amazon Resource Name (ARN) of the task definition to use if the event target is an Amazon ECS task.

      • EventBridgeParameters (dict) --

        The templated target type for the EventBridge PutEvents API operation.

        • DetailType (string) --

          A free-form string, with a maximum of 128 characters, used to decide what fields to expect in the event detail.

        • Source (string) --

          The source of the event.

      • Input (string) --

        The text, or well-formed JSON, passed to the target. If you are configuring a templated Lambda, AWS Step Functions, or Amazon EventBridge target, the input must be a well-formed JSON. For all other target types, a JSON is not required. If you do not specify anything for this field, EventBridge Scheduler delivers a default notification to the target.

      • KinesisParameters (dict) --

        The templated target type for the Amazon Kinesis PutRecord API operation.

      • RetryPolicy (dict) --

        A RetryPolicy object that includes information about the retry policy settings, including the maximum age of an event, and the maximum number of times EventBridge Scheduler will try to deliver the event to a target.

        • MaximumEventAgeInSeconds (integer) --

          The maximum amount of time, in seconds, to continue to make retry attempts.

        • MaximumRetryAttempts (integer) --

          The maximum number of retry attempts to make before the request fails. Retry attempts with exponential backoff continue until either the maximum number of attempts is made or until the duration of the MaximumEventAgeInSeconds is reached.

      • RoleArn (string) --

        The Amazon Resource Name (ARN) of the IAM role that EventBridge Scheduler will use for this target when the schedule is invoked.

      • SageMakerPipelineParameters (dict) --

        The templated target type for the Amazon SageMaker StartPipelineExecution API operation.

        • PipelineParameterList (list) --

          List of parameter names and values to use when executing the SageMaker Model Building Pipeline.

          • (dict) --

            The name and value pair of a parameter to use to start execution of a SageMaker Model Building Pipeline.

            • Name (string) --

              Name of parameter to start execution of a SageMaker Model Building Pipeline.

            • Value (string) --

              Value of parameter to start execution of a SageMaker Model Building Pipeline.

      • SqsParameters (dict) --

        The templated target type for the Amazon SQS SendMessage API operation. Contains the message group ID to use when the target is a FIFO queue. If you specify an Amazon SQS FIFO queue as a target, the queue must have content-based deduplication enabled. For more information, see Using the Amazon SQS message deduplication ID in the Amazon SQS Developer Guide .

        • MessageGroupId (string) --

          The FIFO message group ID to use as the target.

Exceptions

  • EventBridgeScheduler.Client.exceptions.ValidationException
  • EventBridgeScheduler.Client.exceptions.InternalServerException
  • EventBridgeScheduler.Client.exceptions.ResourceNotFoundException
  • EventBridgeScheduler.Client.exceptions.ThrottlingException
get_schedule_group(**kwargs)

Retrieves the specified schedule group.

See also: AWS API Documentation

Request Syntax

response = client.get_schedule_group(
    Name='string'
)
Parameters
Name (string) --

[REQUIRED]

The name of the schedule group to retrieve.

Return type
dict
Returns
Response Syntax
{
    'Arn': 'string',
    'CreationDate': datetime(2015, 1, 1),
    'LastModificationDate': datetime(2015, 1, 1),
    'Name': 'string',
    'State': 'ACTIVE'|'DELETING'
}

Response Structure

  • (dict) --
    • Arn (string) --

      The Amazon Resource Name (ARN) of the schedule group.

    • CreationDate (datetime) --

      The time at which the schedule group was created.

    • LastModificationDate (datetime) --

      The time at which the schedule group was last modified.

    • Name (string) --

      The name of the schedule group.

    • State (string) --

      Specifies the state of the schedule group.

Exceptions

  • EventBridgeScheduler.Client.exceptions.ValidationException
  • EventBridgeScheduler.Client.exceptions.InternalServerException
  • EventBridgeScheduler.Client.exceptions.ResourceNotFoundException
  • EventBridgeScheduler.Client.exceptions.ThrottlingException
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
list_schedule_groups(**kwargs)

Returns a paginated list of your schedule groups.

See also: AWS API Documentation

Request Syntax

response = client.list_schedule_groups(
    MaxResults=123,
    NamePrefix='string',
    NextToken='string'
)
Parameters
  • MaxResults (integer) -- If specified, limits the number of results returned by this operation. The operation also returns a NextToken which you can use in a subsequent operation to retrieve the next set of results.
  • NamePrefix (string) -- The name prefix that you can use to return a filtered list of your schedule groups.
  • NextToken (string) -- The token returned by a previous call to retrieve the next set of results.
Return type

dict

Returns

Response Syntax

{
    'NextToken': 'string',
    'ScheduleGroups': [
        {
            'Arn': 'string',
            'CreationDate': datetime(2015, 1, 1),
            'LastModificationDate': datetime(2015, 1, 1),
            'Name': 'string',
            'State': 'ACTIVE'|'DELETING'
        },
    ]
}

Response Structure

  • (dict) --

    • NextToken (string) --

      Indicates whether there are additional results to retrieve. If the value is null, there are no more results.

    • ScheduleGroups (list) --

      The schedule groups that match the specified criteria.

      • (dict) --

        The details of a schedule group.

        • Arn (string) --

          The Amazon Resource Name (ARN) of the schedule group.

        • CreationDate (datetime) --

          The time at which the schedule group was created.

        • LastModificationDate (datetime) --

          The time at which the schedule group was last modified.

        • Name (string) --

          The name of the schedule group.

        • State (string) --

          Specifies the state of the schedule group.

Exceptions

  • EventBridgeScheduler.Client.exceptions.ValidationException
  • EventBridgeScheduler.Client.exceptions.InternalServerException
  • EventBridgeScheduler.Client.exceptions.ThrottlingException
list_schedules(**kwargs)

Returns a paginated list of your EventBridge Scheduler schedules.

See also: AWS API Documentation

Request Syntax

response = client.list_schedules(
    GroupName='string',
    MaxResults=123,
    NamePrefix='string',
    NextToken='string',
    State='ENABLED'|'DISABLED'
)
Parameters
  • GroupName (string) -- If specified, only lists the schedules whose associated schedule group matches the given filter.
  • MaxResults (integer) -- If specified, limits the number of results returned by this operation. The operation also returns a NextToken which you can use in a subsequent operation to retrieve the next set of results.
  • NamePrefix (string) -- Schedule name prefix to return the filtered list of resources.
  • NextToken (string) -- The token returned by a previous call to retrieve the next set of results.
  • State (string) -- If specified, only lists the schedules whose current state matches the given filter.
Return type

dict

Returns

Response Syntax

{
    'NextToken': 'string',
    'Schedules': [
        {
            'Arn': 'string',
            'CreationDate': datetime(2015, 1, 1),
            'GroupName': 'string',
            'LastModificationDate': datetime(2015, 1, 1),
            'Name': 'string',
            'State': 'ENABLED'|'DISABLED',
            'Target': {
                'Arn': 'string'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • NextToken (string) --

      Indicates whether there are additional results to retrieve. If the value is null, there are no more results.

    • Schedules (list) --

      The schedules that match the specified criteria.

      • (dict) --

        The details of a schedule.

        • Arn (string) --

          The Amazon Resource Name (ARN) of the schedule.

        • CreationDate (datetime) --

          The time at which the schedule was created.

        • GroupName (string) --

          The name of the schedule group associated with this schedule.

        • LastModificationDate (datetime) --

          The time at which the schedule was last modified.

        • Name (string) --

          The name of the schedule.

        • State (string) --

          Specifies whether the schedule is enabled or disabled.

        • Target (dict) --

          The schedule's target details.

          • Arn (string) --

            The Amazon Resource Name (ARN) of the target.

Exceptions

  • EventBridgeScheduler.Client.exceptions.ValidationException
  • EventBridgeScheduler.Client.exceptions.InternalServerException
  • EventBridgeScheduler.Client.exceptions.ResourceNotFoundException
  • EventBridgeScheduler.Client.exceptions.ThrottlingException
list_tags_for_resource(**kwargs)

Lists the tags associated with the Scheduler resource.

See also: AWS API Documentation

Request Syntax

response = client.list_tags_for_resource(
    ResourceArn='string'
)
Parameters
ResourceArn (string) --

[REQUIRED]

The ARN of the EventBridge Scheduler resource for which you want to view tags.

Return type
dict
Returns
Response Syntax
{
    'Tags': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
}

Response Structure

  • (dict) --
    • Tags (list) --

      The list of tags associated with the specified resource.

      • (dict) --

        Tag to associate with a schedule group.

        • Key (string) --

          The key for the tag.

        • Value (string) --

          The value for the tag.

Exceptions

  • EventBridgeScheduler.Client.exceptions.ValidationException
  • EventBridgeScheduler.Client.exceptions.InternalServerException
  • EventBridgeScheduler.Client.exceptions.ResourceNotFoundException
  • EventBridgeScheduler.Client.exceptions.ThrottlingException
tag_resource(**kwargs)

Assigns one or more tags (key-value pairs) to the specified EventBridge Scheduler resource. You can only assign tags to schedule groups.

See also: AWS API Documentation

Request Syntax

response = client.tag_resource(
    ResourceArn='string',
    Tags=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
)
Parameters
  • ResourceArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the schedule group that you are adding tags to.

  • Tags (list) --

    [REQUIRED]

    The list of tags to associate with the schedule group.

    • (dict) --

      Tag to associate with a schedule group.

      • Key (string) -- [REQUIRED]

        The key for the tag.

      • Value (string) -- [REQUIRED]

        The value for the tag.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • EventBridgeScheduler.Client.exceptions.ValidationException
  • EventBridgeScheduler.Client.exceptions.InternalServerException
  • EventBridgeScheduler.Client.exceptions.ConflictException
  • EventBridgeScheduler.Client.exceptions.ResourceNotFoundException
  • EventBridgeScheduler.Client.exceptions.ThrottlingException
untag_resource(**kwargs)

Removes one or more tags from the specified EventBridge Scheduler schedule group.

See also: AWS API Documentation

Request Syntax

response = client.untag_resource(
    ResourceArn='string',
    TagKeys=[
        'string',
    ]
)
Parameters
  • ResourceArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the schedule group from which you are removing tags.

  • TagKeys (list) --

    [REQUIRED]

    The list of tag keys to remove from the resource.

    • (string) --
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

Exceptions

  • EventBridgeScheduler.Client.exceptions.ValidationException
  • EventBridgeScheduler.Client.exceptions.InternalServerException
  • EventBridgeScheduler.Client.exceptions.ConflictException
  • EventBridgeScheduler.Client.exceptions.ResourceNotFoundException
  • EventBridgeScheduler.Client.exceptions.ThrottlingException
update_schedule(**kwargs)

Updates the specified schedule. When you call UpdateSchedule , EventBridge Scheduler uses all values, including empty values, specified in the request and overrides the existing schedule. This is by design. This means that if you do not set an optional field in your request, that field will be set to its system-default value after the update.

Before calling this operation, we recommend that you call the GetSchedule API operation and make a note of all optional parameters for your UpdateSchedule call.

See also: AWS API Documentation

Request Syntax

response = client.update_schedule(
    ClientToken='string',
    Description='string',
    EndDate=datetime(2015, 1, 1),
    FlexibleTimeWindow={
        'MaximumWindowInMinutes': 123,
        'Mode': 'OFF'|'FLEXIBLE'
    },
    GroupName='string',
    KmsKeyArn='string',
    Name='string',
    ScheduleExpression='string',
    ScheduleExpressionTimezone='string',
    StartDate=datetime(2015, 1, 1),
    State='ENABLED'|'DISABLED',
    Target={
        'Arn': 'string',
        'DeadLetterConfig': {
            'Arn': 'string'
        },
        'EcsParameters': {
            'CapacityProviderStrategy': [
                {
                    'base': 123,
                    'capacityProvider': 'string',
                    'weight': 123
                },
            ],
            'EnableECSManagedTags': True|False,
            'EnableExecuteCommand': True|False,
            'Group': 'string',
            'LaunchType': 'EC2'|'FARGATE'|'EXTERNAL',
            'NetworkConfiguration': {
                'awsvpcConfiguration': {
                    'AssignPublicIp': 'ENABLED'|'DISABLED',
                    'SecurityGroups': [
                        'string',
                    ],
                    'Subnets': [
                        'string',
                    ]
                }
            },
            'PlacementConstraints': [
                {
                    'expression': 'string',
                    'type': 'distinctInstance'|'memberOf'
                },
            ],
            'PlacementStrategy': [
                {
                    'field': 'string',
                    'type': 'random'|'spread'|'binpack'
                },
            ],
            'PlatformVersion': 'string',
            'PropagateTags': 'TASK_DEFINITION',
            'ReferenceId': 'string',
            'Tags': [
                {
                    'string': 'string'
                },
            ],
            'TaskCount': 123,
            'TaskDefinitionArn': 'string'
        },
        'EventBridgeParameters': {
            'DetailType': 'string',
            'Source': 'string'
        },
        'Input': 'string',
        'KinesisParameters': {
            'PartitionKey': 'string'
        },
        'RetryPolicy': {
            'MaximumEventAgeInSeconds': 123,
            'MaximumRetryAttempts': 123
        },
        'RoleArn': 'string',
        'SageMakerPipelineParameters': {
            'PipelineParameterList': [
                {
                    'Name': 'string',
                    'Value': 'string'
                },
            ]
        },
        'SqsParameters': {
            'MessageGroupId': 'string'
        }
    }
)
Parameters
  • ClientToken (string) --

    Unique, case-sensitive identifier you provide to ensure the idempotency of the request. If you do not specify a client token, EventBridge Scheduler uses a randomly generated token for the request to ensure idempotency.

    This field is autopopulated if not provided.

  • Description (string) -- The description you specify for the schedule.
  • EndDate (datetime) -- The date, in UTC, before which the schedule can invoke its target. Depending on the schedule's recurrence expression, invocations might stop on, or before, the EndDate you specify. EventBridge Scheduler ignores EndDate for one-time schedules.
  • FlexibleTimeWindow (dict) --

    [REQUIRED]

    Allows you to configure a time window during which EventBridge Scheduler invokes the schedule.

    • MaximumWindowInMinutes (integer) --

      The maximum time window during which a schedule can be invoked.

    • Mode (string) -- [REQUIRED]

      Determines whether the schedule is invoked within a flexible time window.

  • GroupName (string) -- The name of the schedule group with which the schedule is associated. You must provide this value in order for EventBridge Scheduler to find the schedule you want to update. If you omit this value, EventBridge Scheduler assumes the group is associated to the default group.
  • KmsKeyArn (string) -- The ARN for the customer managed KMS key that that you want EventBridge Scheduler to use to encrypt and decrypt your data.
  • Name (string) --

    [REQUIRED]

    The name of the schedule that you are updating.

  • ScheduleExpression (string) --

    [REQUIRED]

    The expression that defines when the schedule runs. The following formats are supported.

    • at expression - at(yyyy-mm-ddThh:mm:ss)
    • rate expression - rate(unit value)
    • cron expression - cron(fields)

    You can use at expressions to create one-time schedules that invoke a target once, at the time and in the time zone, that you specify. You can use rate and cron expressions to create recurring schedules. Rate-based schedules are useful when you want to invoke a target at regular intervals, such as every 15 minutes or every five days. Cron-based schedules are useful when you want to invoke a target periodically at a specific time, such as at 8:00 am (UTC+0) every 1st day of the month.

    A cron expression consists of six fields separated by white spaces: (minutes hours day_of_month month day_of_week year) .

    A rate expression consists of a value as a positive integer, and a unit with the following options: minute | minutes | hour | hours | day | days

    For more information and examples, see Schedule types on EventBridge Scheduler in the EventBridge Scheduler User Guide .

  • ScheduleExpressionTimezone (string) -- The timezone in which the scheduling expression is evaluated.
  • StartDate (datetime) -- The date, in UTC, after which the schedule can begin invoking its target. Depending on the schedule's recurrence expression, invocations might occur on, or after, the StartDate you specify. EventBridge Scheduler ignores StartDate for one-time schedules.
  • State (string) -- Specifies whether the schedule is enabled or disabled.
  • Target (dict) --

    [REQUIRED]

    The schedule target. You can use this operation to change the target that your schedule invokes.

    • Arn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the target.

    • DeadLetterConfig (dict) --

      An object that contains information about an Amazon SQS queue that EventBridge Scheduler uses as a dead-letter queue for your schedule. If specified, EventBridge Scheduler delivers failed events that could not be successfully delivered to a target to the queue.

      • Arn (string) --

        The Amazon Resource Name (ARN) of the SQS queue specified as the destination for the dead-letter queue.

    • EcsParameters (dict) --

      The templated target type for the Amazon ECS RunTask API operation.

      • CapacityProviderStrategy (list) --

        The capacity provider strategy to use for the task.

        • (dict) --

          The details of a capacity provider strategy.

          • base (integer) --

            The base value designates how many tasks, at a minimum, to run on the specified capacity provider. Only one capacity provider in a capacity provider strategy can have a base defined. If no value is specified, the default value of 0 is used.

          • capacityProvider (string) -- [REQUIRED]

            The short name of the capacity provider.

          • weight (integer) --

            The weight value designates the relative percentage of the total number of tasks launched that should use the specified capacity provider. The weight value is taken into consideration after the base value, if defined, is satisfied.

      • EnableECSManagedTags (boolean) --

        Specifies whether to enable Amazon ECS managed tags for the task. For more information, see Tagging Your Amazon ECS Resources in the Amazon ECS Developer Guide .

      • EnableExecuteCommand (boolean) --

        Whether or not to enable the execute command functionality for the containers in this task. If true, this enables execute command functionality on all containers in the task.

      • Group (string) --

        Specifies an ECS task group for the task. The maximum length is 255 characters.

      • LaunchType (string) --

        Specifies the launch type on which your task is running. The launch type that you specify here must match one of the launch type (compatibilities) of the target task. The FARGATE value is supported only in the Regions where Fargate with Amazon ECS is supported. For more information, see AWS Fargate on Amazon ECS in the Amazon ECS Developer Guide .

      • NetworkConfiguration (dict) --

        This structure specifies the network configuration for an ECS task.

        • awsvpcConfiguration (dict) --

          Specifies the Amazon VPC subnets and security groups for the task, and whether a public IP address is to be used. This structure is relevant only for ECS tasks that use the awsvpc network mode.

          • AssignPublicIp (string) --

            Specifies whether the task's elastic network interface receives a public IP address. You can specify ENABLED only when LaunchType in EcsParameters is set to FARGATE .

          • SecurityGroups (list) --

            Specifies the security groups associated with the task. These security groups must all be in the same VPC. You can specify as many as five security groups. If you do not specify a security group, the default security group for the VPC is used.

            • (string) --
          • Subnets (list) -- [REQUIRED]

            Specifies the subnets associated with the task. These subnets must all be in the same VPC. You can specify as many as 16 subnets.

            • (string) --
      • PlacementConstraints (list) --

        An array of placement constraint objects to use for the task. You can specify up to 10 constraints per task (including constraints in the task definition and those specified at runtime).

        • (dict) --

          An object representing a constraint on task placement.

          • expression (string) --

            A cluster query language expression to apply to the constraint. You cannot specify an expression if the constraint type is distinctInstance . For more information, see Cluster query language in the Amazon ECS Developer Guide .

          • type (string) --

            The type of constraint. Use distinctInstance to ensure that each task in a particular group is running on a different container instance. Use memberOf to restrict the selection to a group of valid candidates.

      • PlacementStrategy (list) --

        The task placement strategy for a task or service.

        • (dict) --

          The task placement strategy for a task or service.

          • field (string) --

            The field to apply the placement strategy against. For the spread placement strategy, valid values are instanceId (or instanceId , which has the same effect), or any platform or custom attribute that is applied to a container instance, such as attribute:ecs.availability-zone . For the binpack placement strategy, valid values are cpu and memory . For the random placement strategy, this field is not used.

          • type (string) --

            The type of placement strategy. The random placement strategy randomly places tasks on available candidates. The spread placement strategy spreads placement across available candidates evenly based on the field parameter. The binpack strategy places tasks on available candidates that have the least available amount of the resource that is specified with the field parameter. For example, if you binpack on memory, a task is placed on the instance with the least amount of remaining memory (but still enough to run the task).

      • PlatformVersion (string) --

        Specifies the platform version for the task. Specify only the numeric portion of the platform version, such as 1.1.0 .

      • PropagateTags (string) --

        Specifies whether to propagate the tags from the task definition to the task. If no value is specified, the tags are not propagated. Tags can only be propagated to the task during task creation. To add tags to a task after task creation, use Amazon ECS's TagResource API action.

      • ReferenceId (string) --

        The reference ID to use for the task.

      • Tags (list) --

        The metadata that you apply to the task to help you categorize and organize them. Each tag consists of a key and an optional value, both of which you define. For more information, see RunTask in the Amazon ECS API Reference .

        • (dict) --
          • (string) --
            • (string) --
      • TaskCount (integer) --

        The number of tasks to create based on TaskDefinition . The default is 1 .

      • TaskDefinitionArn (string) -- [REQUIRED]

        The Amazon Resource Name (ARN) of the task definition to use if the event target is an Amazon ECS task.

    • EventBridgeParameters (dict) --

      The templated target type for the EventBridge PutEvents API operation.

      • DetailType (string) -- [REQUIRED]

        A free-form string, with a maximum of 128 characters, used to decide what fields to expect in the event detail.

      • Source (string) -- [REQUIRED]

        The source of the event.

    • Input (string) --

      The text, or well-formed JSON, passed to the target. If you are configuring a templated Lambda, AWS Step Functions, or Amazon EventBridge target, the input must be a well-formed JSON. For all other target types, a JSON is not required. If you do not specify anything for this field, EventBridge Scheduler delivers a default notification to the target.

    • KinesisParameters (dict) --

      The templated target type for the Amazon Kinesis PutRecord API operation.

    • RetryPolicy (dict) --

      A RetryPolicy object that includes information about the retry policy settings, including the maximum age of an event, and the maximum number of times EventBridge Scheduler will try to deliver the event to a target.

      • MaximumEventAgeInSeconds (integer) --

        The maximum amount of time, in seconds, to continue to make retry attempts.

      • MaximumRetryAttempts (integer) --

        The maximum number of retry attempts to make before the request fails. Retry attempts with exponential backoff continue until either the maximum number of attempts is made or until the duration of the MaximumEventAgeInSeconds is reached.

    • RoleArn (string) -- [REQUIRED]

      The Amazon Resource Name (ARN) of the IAM role that EventBridge Scheduler will use for this target when the schedule is invoked.

    • SageMakerPipelineParameters (dict) --

      The templated target type for the Amazon SageMaker StartPipelineExecution API operation.

      • PipelineParameterList (list) --

        List of parameter names and values to use when executing the SageMaker Model Building Pipeline.

        • (dict) --

          The name and value pair of a parameter to use to start execution of a SageMaker Model Building Pipeline.

          • Name (string) -- [REQUIRED]

            Name of parameter to start execution of a SageMaker Model Building Pipeline.

          • Value (string) -- [REQUIRED]

            Value of parameter to start execution of a SageMaker Model Building Pipeline.

    • SqsParameters (dict) --

      The templated target type for the Amazon SQS SendMessage API operation. Contains the message group ID to use when the target is a FIFO queue. If you specify an Amazon SQS FIFO queue as a target, the queue must have content-based deduplication enabled. For more information, see Using the Amazon SQS message deduplication ID in the Amazon SQS Developer Guide .

      • MessageGroupId (string) --

        The FIFO message group ID to use as the target.

Return type

dict

Returns

Response Syntax

{
    'ScheduleArn': 'string'
}

Response Structure

  • (dict) --

    • ScheduleArn (string) --

      The Amazon Resource Name (ARN) of the schedule that you updated.

Exceptions

  • EventBridgeScheduler.Client.exceptions.ValidationException
  • EventBridgeScheduler.Client.exceptions.InternalServerException
  • EventBridgeScheduler.Client.exceptions.ConflictException
  • EventBridgeScheduler.Client.exceptions.ResourceNotFoundException
  • EventBridgeScheduler.Client.exceptions.ThrottlingException

Paginators

The available paginators are:

class EventBridgeScheduler.Paginator.ListScheduleGroups
paginator = client.get_paginator('list_schedule_groups')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EventBridgeScheduler.Client.list_schedule_groups().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    NamePrefix='string',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • NamePrefix (string) -- The name prefix that you can use to return a filtered list of your schedule groups.
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'ScheduleGroups': [
        {
            'Arn': 'string',
            'CreationDate': datetime(2015, 1, 1),
            'LastModificationDate': datetime(2015, 1, 1),
            'Name': 'string',
            'State': 'ACTIVE'|'DELETING'
        },
    ]
}

Response Structure

  • (dict) --

    • ScheduleGroups (list) --

      The schedule groups that match the specified criteria.

      • (dict) --

        The details of a schedule group.

        • Arn (string) --

          The Amazon Resource Name (ARN) of the schedule group.

        • CreationDate (datetime) --

          The time at which the schedule group was created.

        • LastModificationDate (datetime) --

          The time at which the schedule group was last modified.

        • Name (string) --

          The name of the schedule group.

        • State (string) --

          Specifies the state of the schedule group.

class EventBridgeScheduler.Paginator.ListSchedules
paginator = client.get_paginator('list_schedules')
paginate(**kwargs)

Creates an iterator that will paginate through responses from EventBridgeScheduler.Client.list_schedules().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    GroupName='string',
    NamePrefix='string',
    State='ENABLED'|'DISABLED',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • GroupName (string) -- If specified, only lists the schedules whose associated schedule group matches the given filter.
  • NamePrefix (string) -- Schedule name prefix to return the filtered list of resources.
  • State (string) -- If specified, only lists the schedules whose current state matches the given filter.
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'Schedules': [
        {
            'Arn': 'string',
            'CreationDate': datetime(2015, 1, 1),
            'GroupName': 'string',
            'LastModificationDate': datetime(2015, 1, 1),
            'Name': 'string',
            'State': 'ENABLED'|'DISABLED',
            'Target': {
                'Arn': 'string'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • Schedules (list) --

      The schedules that match the specified criteria.

      • (dict) --

        The details of a schedule.

        • Arn (string) --

          The Amazon Resource Name (ARN) of the schedule.

        • CreationDate (datetime) --

          The time at which the schedule was created.

        • GroupName (string) --

          The name of the schedule group associated with this schedule.

        • LastModificationDate (datetime) --

          The time at which the schedule was last modified.

        • Name (string) --

          The name of the schedule.

        • State (string) --

          Specifies whether the schedule is enabled or disabled.

        • Target (dict) --

          The schedule's target details.

          • Arn (string) --

            The Amazon Resource Name (ARN) of the target.