gcloud
CloudSQL インスタンスと GAE アプリの関係を管理するためにインストールしました。
データベースの 1 つに接続する必要があるアプリがいくつかあり、展開プロセスの合理化の一環として、このデータベースで承認された新しい GAE アプリを追加するプロセスを自動化しようとしています。
コマンドを使用しようとしてpatch
いますが、配列の場合、完全な値が上書きされるため、完全な配列を渡す必要があります。ただし、そうするための正確な構文を理解することはできません。これは私の最善の推測です。
$ gcloud sql instances patch projectname:databasename --authorized-gae-apps="testappid1,testappid2"
This command will change the instance settings.
All arrays must be fully-specified. Any previous data in an array will be overwritten with the given list.
The following JSON message will be used for the patch API method.
{'instance': 'test', 'settings': {'authorizedGaeApplications': ['testappid1,testappid2']}}
Do you want to continue (Y/n)? Y
ERROR: (gcloud.sql.instances.patch) ResponseError: status=400, code=Bad Request, reason=invalid
message=Invalid Value
各値を分離するのではなく、アプリを配列内の文字列として送信しているようです。他のいくつかのアプローチを試しましたが、コマンドライン引数を JSON の複数項目配列に正常に変換する方法はありませんでした。
このようなことをすると (アプリを 1 つだけ設定する)、機能しますが、完全な値が上書きされます。これは私が望むものではありません。
gcloud sql instances patch projectname:databasename --authorized-gae-apps="testappid1"
gcloud
コマンドラインから複数の許可された GAE アプリを指定できるようにするにはどうすればよいですか?