120 lines
5.0 KiB
YAML
120 lines
5.0 KiB
YAML
- help_text:
|
|
brief: Update a Cloud Scheduler job that triggers an action via HTTP.
|
|
description: Update a Cloud Scheduler job that triggers an action via HTTP.
|
|
examples: |
|
|
Update my-job's retry attempt limit:
|
|
|
|
$ {command} my-job --max-retry-attempts=2
|
|
|
|
request:
|
|
collection: cloudscheduler.projects.locations.jobs
|
|
method: patch
|
|
modify_request_hooks:
|
|
- googlecloudsdk.command_lib.scheduler.util:SetRequestJobName
|
|
- googlecloudsdk.command_lib.scheduler.util:SetHTTPRequestMessageBody
|
|
- googlecloudsdk.command_lib.scheduler.util:SetHTTPRequestUpdateHeaders
|
|
- googlecloudsdk.command_lib.scheduler.util:UpdateHTTPMaskHook
|
|
|
|
arguments:
|
|
resource:
|
|
help_text: Job to update.
|
|
spec: !REF googlecloudsdk.command_lib.scheduler.resources:job
|
|
params:
|
|
- _REF_: googlecloudsdk.command_lib.scheduler.flags:schedule
|
|
- _REF_: googlecloudsdk.command_lib.scheduler.flags:clearable_timezone
|
|
- _REF_: googlecloudsdk.command_lib.scheduler.flags:description
|
|
- _REF_: googlecloudsdk.command_lib.scheduler.flags:clearable_retry_attempts
|
|
- _REF_: googlecloudsdk.command_lib.scheduler.flags:clearable_retry_duration
|
|
- _REF_: googlecloudsdk.command_lib.scheduler.flags:clearable_min_backoff
|
|
- _REF_: googlecloudsdk.command_lib.scheduler.flags:clearable_max_backoff
|
|
- _REF_: googlecloudsdk.command_lib.scheduler.flags:clearable_max_doublings
|
|
- api_field: job.httpTarget.uri
|
|
arg_name: uri
|
|
# Can't use : in argument hooks so omit it both from regex and help
|
|
# message.
|
|
type:
|
|
googlecloudsdk.calliope.arg_parsers:RegexpValidator:pattern=^https?.//.*,description=Must
|
|
be a valid HTTP or HTTPS URL.
|
|
help_text: |
|
|
The full URI path that the request will be sent to. This string must
|
|
begin with either "http://" or "https://". For example,
|
|
`http://acme.com` or `https://acme.com/sales:8080`. Cloud Scheduler will
|
|
encode some characters for safety and compatibility. The maximum allowed
|
|
URL length is 2083 characters after encoding.
|
|
- api_field: job.httpTarget.httpMethod
|
|
arg_name: http-method
|
|
default: post
|
|
choices:
|
|
- arg_value: post
|
|
enum_value: POST
|
|
- arg_value: head
|
|
enum_value: HEAD
|
|
- arg_value: get
|
|
enum_value: GET
|
|
- arg_value: put
|
|
enum_value: PUT
|
|
- arg_value: delete
|
|
enum_value: DELETE
|
|
help_text: |
|
|
HTTP method to use for the request.
|
|
- _REF_: googlecloudsdk.command_lib.scheduler.flags:attempt_deadline
|
|
- group:
|
|
mutex: true
|
|
params:
|
|
- arg_name: clear-headers
|
|
action: store_true
|
|
processor: googlecloudsdk.command_lib.scheduler.util:ClearFlag
|
|
help_text: |
|
|
Clear the list of HTTP headers.
|
|
- group:
|
|
params:
|
|
- arg_name: update-headers
|
|
metavar: KEY=VALUE
|
|
type: "googlecloudsdk.calliope.arg_parsers:ArgDict:"
|
|
help_text: |
|
|
KEY=VALUE pairs of HTTP headers to include in the request.
|
|
*Cannot be repeated*. For example:
|
|
`--update-headers Accept-Language=en-us,Accept=text/plain`
|
|
- arg_name: remove-headers
|
|
type: "googlecloudsdk.calliope.arg_parsers:ArgList:"
|
|
help_text: |
|
|
KEY1,KEY2 list of HTTP headers to remove from the request.
|
|
`--remove-headers Accept-Language,Accept`
|
|
- group:
|
|
mutex: true
|
|
params:
|
|
- api_field: job.httpTarget.body
|
|
arg_name: message-body
|
|
help_text: |
|
|
Data payload to be included as the body of the HTTP
|
|
request. May only be given with compatible HTTP methods (PUT
|
|
or POST).
|
|
- api_field: job.httpTarget.body
|
|
arg_name: message-body-from-file
|
|
type:
|
|
googlecloudsdk.calliope.arg_parsers:FileContents:binary=True
|
|
help_text: |
|
|
Path to file containing the data payload to be included as the
|
|
body of the HTTP request. May only be given with compatible HTTP
|
|
methods (PUT or POST).
|
|
- arg_name: clear-message-body
|
|
action: store_true
|
|
processor: googlecloudsdk.command_lib.scheduler.util:ClearFlag
|
|
help_text: |
|
|
Clear the field corresponding to `--message-body` or `--message-body-from-file`.
|
|
- group:
|
|
help_text: |
|
|
How the request sent to the target when executing the job should be
|
|
authenticated.
|
|
mutex: true
|
|
params:
|
|
- _REF_: googlecloudsdk.command_lib.scheduler.flags:auth_token_openid
|
|
- _REF_: googlecloudsdk.command_lib.scheduler.flags:auth_token_oauth
|
|
- arg_name: clear-auth-token
|
|
action: store_true
|
|
processor: googlecloudsdk.command_lib.scheduler.util:ClearFlag
|
|
help_text: |
|
|
Clear the auth token fields: `--oidc-service-account-email`,
|
|
`--oidc-token-audience`, `--oauth-service-account-email`,
|
|
and `--oauth-token-scope`.
|