1- help_text:
2    brief: Create a Cloud Scheduler job with an App Engine target.
3    description: Create a Cloud Scheduler job with an App Engine target.
4    examples: |
5      The following command creates a job that sends a request to the
6      '/cron-handler' path in you App Engine app every 3 hours:
7
8        $ {command} my-job --schedule="0 */3 * * *"
9          --relative-url="/cron-handler"
10
11  request:
12    collection: cloudscheduler.projects.locations.jobs
13    method: create
14    modify_request_hooks:
15    - googlecloudsdk.command_lib.scheduler.util:ModifyCreateJobRequest
16
17  arguments:
18    resource:
19      help_text: Job to create.
20      spec: !REF googlecloudsdk.command_lib.scheduler.resources:job
21      removed_flags: [location]
22    params:
23    - _REF_: googlecloudsdk.command_lib.scheduler.flags:schedule
24      required: true
25    - _REF_: googlecloudsdk.command_lib.scheduler.flags:timezone
26    - _REF_: googlecloudsdk.command_lib.scheduler.flags:description
27    - _REF_: googlecloudsdk.command_lib.scheduler.flags:attempt_deadline
28    - _REF_: googlecloudsdk.command_lib.scheduler.flags:retry_attempts
29    - _REF_: googlecloudsdk.command_lib.scheduler.flags:retry_duration
30    - _REF_: googlecloudsdk.command_lib.scheduler.flags:min_backoff
31    - _REF_: googlecloudsdk.command_lib.scheduler.flags:max_backoff
32    - _REF_: googlecloudsdk.command_lib.scheduler.flags:max_doublings
33    - api_field: job.appEngineHttpTarget.relativeUri
34      arg_name: relative-url
35      default: /
36      type: googlecloudsdk.calliope.arg_parsers:RegexpValidator:pattern=^/.*,description=Must
37        begin with [/].)
38      help_text: |
39        Relative URL to use for the request (beginning with "/").
40    - api_field: job.appEngineHttpTarget.httpMethod
41      arg_name: http-method
42      default: post
43      choices:
44      - arg_value: post
45        enum_value: POST
46      - arg_value: head
47        enum_value: HEAD
48      - arg_value: get
49        enum_value: GET
50      - arg_value: put
51        enum_value: PUT
52      - arg_value: delete
53        enum_value: DELETE
54      help_text: |
55        HTTP method to use for the request.
56    # TODO(b/113588592) Convert --version and --service to a resource arg.
57    - api_field: job.appEngineHttpTarget.appEngineRouting.version
58      arg_name: version
59      help_text: |
60        Version of the App Engine service to send the request to.
61    - api_field: job.appEngineHttpTarget.appEngineRouting.service
62      arg_name: service
63      help_text: |
64        ID of the App Engine service to send the request to.
65    - api_field: job.appEngineHttpTarget.headers.additionalProperties
66      arg_name: headers
67      type:
68        arg_dict:
69          flatten: true
70          spec:
71          - api_field: key
72          - api_field: value
73      help_text: |-
74        KEY=VALUE pairs of HTTP headers to include in the request.
75        *Cannot be repeated*. For example:
76        `--headers Accept-Language=en-us,Accept=text/plain`
77    - group:
78        mutex: true
79        params:
80        - api_field: job.appEngineHttpTarget.body
81          arg_name: message-body
82          help_text: |
83            Data payload to be included as the body of the HTTP
84            request. May only be given with compatible HTTP methods (PUT
85            or POST).
86
87        - api_field: job.appEngineHttpTarget.body
88          arg_name: message-body-from-file
89          type: "googlecloudsdk.calliope.arg_parsers:FileContents:binary=True"
90          help_text: |
91            Path to file containing the data payload to be included as the
92            body of the HTTP request. May only be given with compatible HTTP
93            methods (PUT or POST).
94