update

説明

既存のシークレットのメタデータ(説明や有効期限など)を更新します。

概要

$ abeja secret update [--help]
Usage: abeja secret update [OPTIONS]

  Update an existing secret

Options:
  -s, --secret_id, --secret-id TEXT
                                  Secret ID  [required]
  -d, --description TEXT          Secret description
  -e, --expired-at TEXT           Expiration date in ISO 8601 format
                                  (e.g. 2025-12-31T23:59:59+09:00)
  --integration_service_type, --integration-service-type TEXT
                                  Service Type of the ABEJA Platform to integrate secret. Currently, only `abeja-platform-labs` is supported.
  --integration_service_ids, --integration-service-ids TEXT (comma separated)
                                  Resource IDs of the ABEJA Platform to integrate secret.
                                  If `integration_service_type` is "abeja-platform-labs", the integration service ids must be a list of labs app ids with comma separated (e.g. "1111111111111,2222222222222")
  --organization_id, --organization-id TEXT
                                  Organization ID. If not specified, the current
                                  organization ID is used.
  --help                          Show this message and exit.

オプション

-s, --secret_id, --secret-id

更新したいシークレットの ID を指定します。このオプションは必須です。

-d, --description

シークレットの説明を更新します。

-e, --expired-at

シークレットの有効期限を ISO 8601 形式(例:2025-12-31T23:59:59+09:00)で更新します。

--integration_service_type, --integration-service-type

シークレットを連携する ABEJA Platform のサービスタイプ(ABEJA Platform Labs など)を指定します。現在、abeja-platform-labs のみがサポートされています。

--integration_service_ids, --integration-service-ids

シークレットを連携する ABEJA Platform のリソース ID(LabsアプリIDなど)を指定します。integration_service_typeabeja-platform-labs の場合、連携サービス ID はカンマ区切りの Labsアプリ ID のリストである必要があります(例:”1111111111111,2222222222222”)。

--organization_id, --organization-id

組織 ID を指定します。指定しない場合は、設定から現在の組織 ID が使用されます。

シークレットの説明を更新

コマンド:

$ abeja secret update --secret-id secret-abcdef123456 --description "プロダクションデータベースパスワードの更新された説明"

出力:

{
  "id": "secret-abcdef123456",
  "name": "database-password",
  "description": "プロダクションデータベースパスワードの更新された説明",
  "integration_service_type": null,
  "integration_service_ids": [],
  "created_at": "2023-05-01T10:30:00.000000Z",
  "updated_at": "2023-05-12T16:00:00.000000Z",
  "expired_at": "2025-05-01T10:30:00.000000Z",
  "versions": [
    {
      "version": 1,
      "created_at": "2023-05-01T10:30:00.000000Z"
    }
  ]
}

シークレットの有効期限を更新

コマンド:

$ abeja secret update --secret-id secret-abcdef123456 --expired-at 2026-12-31T23:59:59+09:00

出力:

{
  "id": "secret-abcdef123456",
  "name": "database-password",
  "description": "プロダクションデータベースパスワードの更新された説明",
  "integration_service_type": null,
  "integration_service_ids": [],
  "created_at": "2023-05-01T10:30:00.000000Z",
  "updated_at": "2023-05-12T16:05:00.000000Z",
  "expired_at": "2026-12-31T23:59:59+09:00",
  "versions": [
    {
      "version": 1,
      "created_at": "2023-05-01T10:30:00.000000Z"
    }
  ]
}

ABEJA Platform Labs 連携でシークレットを更新

コマンド:

$ abeja secret update --secret-id secret-abcdef123456 --integration-service-type "abeja-platform-labs" --integration-service-ids "1111111111111,2222222222222"

出力:

{
  "id": "secret-abcdef123456",
  "name": "database-password",
  "description": "プロダクションデータベースパスワードの更新された説明",
  "integration_service_type": "abeja-platform-labs",
  "integration_service_ids": ["1111111111111", "2222222222222"],
  "created_at": "2023-05-01T10:30:00.000000Z",
  "updated_at": "2023-05-12T16:05:00.000000Z",
  "expired_at": "2026-12-31T23:59:59+09:00",
  "versions": [
    {
      "version": 1,
      "created_at": "2023-05-01T10:30:00.000000Z"
    }
  ]
}