1- release_tracks: [ALPHA, BETA, GA]
2
3  help_text:
4    brief: Upload a public key for an IAM service account.
5    description: Upload a public key for an IAM service account.
6    examples: |
7      The following command uploads a public key certificate to a service account:
8        {command} test_data/public_key.cert
9          --iam-account=my-iam-account@my-project.iam.gserviceaccount.com
10
11  arguments:
12    resource:
13      help_text: The service account for which to upload a key.
14      spec: !REF googlecloudsdk.command_lib.iam.resources:iam_account
15      is_positional: false
16      is_parent_resource: true
17    params:
18    - arg_name: public_key_file
19      api_field: uploadServiceAccountKeyRequest.publicKeyData
20      required: true
21      is_positional: true
22      help_text: |
23           Path of the file containing the public key. Note that only public key data in the format of
24           RSA_X509_PEM is supported. See https://cloud.google.com/iot/docs/concepts/device-security#public_key_format
25           for more information.
26      processor: googlecloudsdk.command_lib.iam.hooks:GeneratePublicKeyDataFromFile
27  request:
28    collection: iam.projects.serviceAccounts.keys
29    modify_request_hooks:
30    - googlecloudsdk.command_lib.iam.hooks:SetServiceAccountResource
31    method: upload
32