Added attempt deadline to scheduler resource

Signed-off-by: Modular Magician <magic-modules@google.com>
This commit is contained in:
guillaume blaquiere 2020-01-16 18:27:26 +00:00 committed by Modular Magician
parent b8bb9bcf06
commit 8cc7c04820
3 changed files with 49 additions and 0 deletions

View file

@ -75,6 +75,20 @@ options:
required: false
default: Etc/UTC
type: str
attempt_deadline:
description:
- The deadline for job attempts. If the request handler does not respond by this
deadline then the request is cancelled and the attempt is marked as a DEADLINE_EXCEEDED
failure. The failed attempt can be viewed in execution logs. Cloud Scheduler
will retry the job according to the RetryConfig.
- 'The allowed duration for this deadline is: * For HTTP targets, between 15 seconds
and 30 minutes.'
- "* For App Engine HTTP targets, between 15 seconds and 24 hours."
- 'A duration in seconds with up to nine fractional digits, terminated by ''s''.
Example: "3.5s" .'
required: false
default: 180s
type: str
retry_config:
description:
- By default, if a job does not complete successfully, meaning that an acknowledgement
@ -339,6 +353,7 @@ EXAMPLES = '''
schedule: "*/4 * * * *"
description: test app engine job
time_zone: Europe/London
attempt_deadline: 320s
app_engine_http_target:
http_method: POST
app_engine_routing:
@ -375,6 +390,19 @@ timeZone:
- The value of this field must be a time zone name from the tz database.
returned: success
type: str
attemptDeadline:
description:
- The deadline for job attempts. If the request handler does not respond by this
deadline then the request is cancelled and the attempt is marked as a DEADLINE_EXCEEDED
failure. The failed attempt can be viewed in execution logs. Cloud Scheduler will
retry the job according to the RetryConfig.
- 'The allowed duration for this deadline is: * For HTTP targets, between 15 seconds
and 30 minutes.'
- "* For App Engine HTTP targets, between 15 seconds and 24 hours."
- 'A duration in seconds with up to nine fractional digits, terminated by ''s''.
Example: "3.5s" .'
returned: success
type: str
retryConfig:
description:
- By default, if a job does not complete successfully, meaning that an acknowledgement
@ -608,6 +636,7 @@ def main():
description=dict(type='str'),
schedule=dict(type='str'),
time_zone=dict(default='Etc/UTC', type='str'),
attempt_deadline=dict(default='180s', type='str'),
retry_config=dict(
type='dict',
options=dict(
@ -695,6 +724,7 @@ def resource_to_request(module):
u'description': module.params.get('description'),
u'schedule': module.params.get('schedule'),
u'timeZone': module.params.get('time_zone'),
u'attemptDeadline': module.params.get('attempt_deadline'),
u'retryConfig': JobRetryconfig(module.params.get('retry_config', {}), module).to_request(),
u'pubsubTarget': JobPubsubtarget(module.params.get('pubsub_target', {}), module).to_request(),
u'appEngineHttpTarget': JobAppenginehttptarget(module.params.get('app_engine_http_target', {}), module).to_request(),
@ -772,6 +802,7 @@ def response_to_hash(module, response):
u'description': module.params.get('description'),
u'schedule': module.params.get('schedule'),
u'timeZone': module.params.get('time_zone'),
u'attemptDeadline': module.params.get('attempt_deadline'),
u'retryConfig': JobRetryconfig(module.params.get('retry_config', {}), module).to_request(),
u'pubsubTarget': JobPubsubtarget(module.params.get('pubsub_target', {}), module).to_request(),
u'appEngineHttpTarget': JobAppenginehttptarget(module.params.get('app_engine_http_target', {}), module).to_request(),

View file

@ -132,6 +132,19 @@ resources:
- The value of this field must be a time zone name from the tz database.
returned: success
type: str
attemptDeadline:
description:
- The deadline for job attempts. If the request handler does not respond by
this deadline then the request is cancelled and the attempt is marked as a
DEADLINE_EXCEEDED failure. The failed attempt can be viewed in execution logs.
Cloud Scheduler will retry the job according to the RetryConfig.
- 'The allowed duration for this deadline is: * For HTTP targets, between 15
seconds and 30 minutes.'
- "* For App Engine HTTP targets, between 15 seconds and 24 hours."
- 'A duration in seconds with up to nine fractional digits, terminated by ''s''.
Example: "3.5s" .'
returned: success
type: str
retryConfig:
description:
- By default, if a job does not complete successfully, meaning that an acknowledgement

View file

@ -20,6 +20,7 @@
schedule: "*/4 * * * *"
description: test app engine job
time_zone: Europe/London
attempt_deadline: 320s
app_engine_http_target:
http_method: POST
app_engine_routing:
@ -39,6 +40,7 @@
schedule: "*/4 * * * *"
description: test app engine job
time_zone: Europe/London
attempt_deadline: 320s
app_engine_http_target:
http_method: POST
app_engine_routing:
@ -76,6 +78,7 @@
schedule: "*/4 * * * *"
description: test app engine job
time_zone: Europe/London
attempt_deadline: 320s
app_engine_http_target:
http_method: POST
app_engine_routing:
@ -100,6 +103,7 @@
schedule: "*/4 * * * *"
description: test app engine job
time_zone: Europe/London
attempt_deadline: 320s
app_engine_http_target:
http_method: POST
app_engine_routing:
@ -137,6 +141,7 @@
schedule: "*/4 * * * *"
description: test app engine job
time_zone: Europe/London
attempt_deadline: 320s
app_engine_http_target:
http_method: POST
app_engine_routing: