mirror of
https://github.com/ansible-collections/google.cloud.git
synced 2025-04-08 03:40:28 -07:00
Added attempt deadline to scheduler resource
Signed-off-by: Modular Magician <magic-modules@google.com>
This commit is contained in:
parent
b8bb9bcf06
commit
8cc7c04820
3 changed files with 49 additions and 0 deletions
|
@ -75,6 +75,20 @@ options:
|
||||||
required: false
|
required: false
|
||||||
default: Etc/UTC
|
default: Etc/UTC
|
||||||
type: str
|
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:
|
retry_config:
|
||||||
description:
|
description:
|
||||||
- By default, if a job does not complete successfully, meaning that an acknowledgement
|
- By default, if a job does not complete successfully, meaning that an acknowledgement
|
||||||
|
@ -339,6 +353,7 @@ EXAMPLES = '''
|
||||||
schedule: "*/4 * * * *"
|
schedule: "*/4 * * * *"
|
||||||
description: test app engine job
|
description: test app engine job
|
||||||
time_zone: Europe/London
|
time_zone: Europe/London
|
||||||
|
attempt_deadline: 320s
|
||||||
app_engine_http_target:
|
app_engine_http_target:
|
||||||
http_method: POST
|
http_method: POST
|
||||||
app_engine_routing:
|
app_engine_routing:
|
||||||
|
@ -375,6 +390,19 @@ timeZone:
|
||||||
- The value of this field must be a time zone name from the tz database.
|
- The value of this field must be a time zone name from the tz database.
|
||||||
returned: success
|
returned: success
|
||||||
type: str
|
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:
|
retryConfig:
|
||||||
description:
|
description:
|
||||||
- By default, if a job does not complete successfully, meaning that an acknowledgement
|
- By default, if a job does not complete successfully, meaning that an acknowledgement
|
||||||
|
@ -608,6 +636,7 @@ def main():
|
||||||
description=dict(type='str'),
|
description=dict(type='str'),
|
||||||
schedule=dict(type='str'),
|
schedule=dict(type='str'),
|
||||||
time_zone=dict(default='Etc/UTC', type='str'),
|
time_zone=dict(default='Etc/UTC', type='str'),
|
||||||
|
attempt_deadline=dict(default='180s', type='str'),
|
||||||
retry_config=dict(
|
retry_config=dict(
|
||||||
type='dict',
|
type='dict',
|
||||||
options=dict(
|
options=dict(
|
||||||
|
@ -695,6 +724,7 @@ def resource_to_request(module):
|
||||||
u'description': module.params.get('description'),
|
u'description': module.params.get('description'),
|
||||||
u'schedule': module.params.get('schedule'),
|
u'schedule': module.params.get('schedule'),
|
||||||
u'timeZone': module.params.get('time_zone'),
|
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'retryConfig': JobRetryconfig(module.params.get('retry_config', {}), module).to_request(),
|
||||||
u'pubsubTarget': JobPubsubtarget(module.params.get('pubsub_target', {}), 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(),
|
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'description': module.params.get('description'),
|
||||||
u'schedule': module.params.get('schedule'),
|
u'schedule': module.params.get('schedule'),
|
||||||
u'timeZone': module.params.get('time_zone'),
|
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'retryConfig': JobRetryconfig(module.params.get('retry_config', {}), module).to_request(),
|
||||||
u'pubsubTarget': JobPubsubtarget(module.params.get('pubsub_target', {}), 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(),
|
u'appEngineHttpTarget': JobAppenginehttptarget(module.params.get('app_engine_http_target', {}), module).to_request(),
|
||||||
|
|
|
@ -132,6 +132,19 @@ resources:
|
||||||
- The value of this field must be a time zone name from the tz database.
|
- The value of this field must be a time zone name from the tz database.
|
||||||
returned: success
|
returned: success
|
||||||
type: str
|
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:
|
retryConfig:
|
||||||
description:
|
description:
|
||||||
- By default, if a job does not complete successfully, meaning that an acknowledgement
|
- By default, if a job does not complete successfully, meaning that an acknowledgement
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
schedule: "*/4 * * * *"
|
schedule: "*/4 * * * *"
|
||||||
description: test app engine job
|
description: test app engine job
|
||||||
time_zone: Europe/London
|
time_zone: Europe/London
|
||||||
|
attempt_deadline: 320s
|
||||||
app_engine_http_target:
|
app_engine_http_target:
|
||||||
http_method: POST
|
http_method: POST
|
||||||
app_engine_routing:
|
app_engine_routing:
|
||||||
|
@ -39,6 +40,7 @@
|
||||||
schedule: "*/4 * * * *"
|
schedule: "*/4 * * * *"
|
||||||
description: test app engine job
|
description: test app engine job
|
||||||
time_zone: Europe/London
|
time_zone: Europe/London
|
||||||
|
attempt_deadline: 320s
|
||||||
app_engine_http_target:
|
app_engine_http_target:
|
||||||
http_method: POST
|
http_method: POST
|
||||||
app_engine_routing:
|
app_engine_routing:
|
||||||
|
@ -76,6 +78,7 @@
|
||||||
schedule: "*/4 * * * *"
|
schedule: "*/4 * * * *"
|
||||||
description: test app engine job
|
description: test app engine job
|
||||||
time_zone: Europe/London
|
time_zone: Europe/London
|
||||||
|
attempt_deadline: 320s
|
||||||
app_engine_http_target:
|
app_engine_http_target:
|
||||||
http_method: POST
|
http_method: POST
|
||||||
app_engine_routing:
|
app_engine_routing:
|
||||||
|
@ -100,6 +103,7 @@
|
||||||
schedule: "*/4 * * * *"
|
schedule: "*/4 * * * *"
|
||||||
description: test app engine job
|
description: test app engine job
|
||||||
time_zone: Europe/London
|
time_zone: Europe/London
|
||||||
|
attempt_deadline: 320s
|
||||||
app_engine_http_target:
|
app_engine_http_target:
|
||||||
http_method: POST
|
http_method: POST
|
||||||
app_engine_routing:
|
app_engine_routing:
|
||||||
|
@ -137,6 +141,7 @@
|
||||||
schedule: "*/4 * * * *"
|
schedule: "*/4 * * * *"
|
||||||
description: test app engine job
|
description: test app engine job
|
||||||
time_zone: Europe/London
|
time_zone: Europe/London
|
||||||
|
attempt_deadline: 320s
|
||||||
app_engine_http_target:
|
app_engine_http_target:
|
||||||
http_method: POST
|
http_method: POST
|
||||||
app_engine_routing:
|
app_engine_routing:
|
||||||
|
|
Loading…
Add table
Reference in a new issue