Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EventBridge Scheduler get_schedule does not include ActionAfterCompletion in response #7782

Open
neilmunday opened this issue Jun 19, 2024 · 0 comments

Comments

@neilmunday
Copy link

Software versions

moto version: 5.0.9
boto3 version: 1.34.130
Python version: 3.11.7

Problem description

When using the boto3 EventBridgeScheduler client.get_schedule method, the response received when using moto for mocking purposes does not include ActionAfterCompletion in the response.

Expected behaviour

moto's implementation of boto3 EventBridgeScheduler client.get_schedule method should match the response syntax documented by boto3.

How to reproduce

Execute the following code:

#!/usr/bin/env python3

import json
from datetime import datetime

import boto3
import moto

if __name__ == "__main__":

    with moto.mock_aws():

        client = boto3.client("scheduler", region_name="us-east-1")
        client.create_schedule(
            FlexibleTimeWindow={"Mode": "OFF"},
            Name="foo",
            ScheduleExpression="cron(1 0 * * *)",
            StartDate=datetime(2024, 6, 19),
            EndDate=datetime(2024, 6, 26),
            ActionAfterCompletion="DELETE",
            Target={
                "Arn": "arn",
                "Input": json.dumps({"x": True}),
                "RoleArn": "role",
            }
        )

        response = client.get_schedule(Name="foo")
        assert "ActionAfterCompletion" in response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant