Reference documentation and code samples for the Secret Manager V1 API class Google::Cloud::SecretManager::V1::Rotation.
The rotation time and period for a
Secret. At next_rotation_time, Secret
Manager will send a Pub/Sub notification to the topics configured on the
Secret. Secret.topics must be
set to configure rotation.
(::Google::Protobuf::Timestamp) — Optional. Timestamp in UTC at which the
Secret is scheduled to rotate.
Cannot be set to less than 300s (5 min) in the future and at most
3153600000s (100 years).
value (::Google::Protobuf::Timestamp) — Optional. Timestamp in UTC at which the
Secret is scheduled to rotate.
Cannot be set to less than 300s (5 min) in the future and at most
3153600000s (100 years).
(::Google::Protobuf::Timestamp) — Optional. Timestamp in UTC at which the
Secret is scheduled to rotate.
Cannot be set to less than 300s (5 min) in the future and at most
3153600000s (100 years).
(::Google::Protobuf::Duration) — Input only. The Duration between rotation notifications. Must be in seconds
and at least 3600s (1h) and at most 3153600000s (100 years).
value (::Google::Protobuf::Duration) — Input only. The Duration between rotation notifications. Must be in seconds
and at least 3600s (1h) and at most 3153600000s (100 years).
(::Google::Protobuf::Duration) — Input only. The Duration between rotation notifications. Must be in seconds
and at least 3600s (1h) and at most 3153600000s (100 years).
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-09 UTC."],[],[],null,["# Secret Manager V1 API - Class Google::Cloud::SecretManager::V1::Rotation (v1.4.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.4.0 (latest)](/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-Rotation)\n- [1.3.0](/ruby/docs/reference/google-cloud-secret_manager-v1/1.3.0/Google-Cloud-SecretManager-V1-Rotation)\n- [1.2.1](/ruby/docs/reference/google-cloud-secret_manager-v1/1.2.1/Google-Cloud-SecretManager-V1-Rotation)\n- [1.1.0](/ruby/docs/reference/google-cloud-secret_manager-v1/1.1.0/Google-Cloud-SecretManager-V1-Rotation)\n- [1.0.1](/ruby/docs/reference/google-cloud-secret_manager-v1/1.0.1/Google-Cloud-SecretManager-V1-Rotation)\n- [0.21.0](/ruby/docs/reference/google-cloud-secret_manager-v1/0.21.0/Google-Cloud-SecretManager-V1-Rotation)\n- [0.20.0](/ruby/docs/reference/google-cloud-secret_manager-v1/0.20.0/Google-Cloud-SecretManager-V1-Rotation)\n- [0.19.2](/ruby/docs/reference/google-cloud-secret_manager-v1/0.19.2/Google-Cloud-SecretManager-V1-Rotation)\n- [0.18.0](/ruby/docs/reference/google-cloud-secret_manager-v1/0.18.0/Google-Cloud-SecretManager-V1-Rotation)\n- [0.17.2](/ruby/docs/reference/google-cloud-secret_manager-v1/0.17.2/Google-Cloud-SecretManager-V1-Rotation)\n- [0.16.0](/ruby/docs/reference/google-cloud-secret_manager-v1/0.16.0/Google-Cloud-SecretManager-V1-Rotation)\n- [0.15.0](/ruby/docs/reference/google-cloud-secret_manager-v1/0.15.0/Google-Cloud-SecretManager-V1-Rotation)\n- [0.14.0](/ruby/docs/reference/google-cloud-secret_manager-v1/0.14.0/Google-Cloud-SecretManager-V1-Rotation)\n- [0.13.0](/ruby/docs/reference/google-cloud-secret_manager-v1/0.13.0/Google-Cloud-SecretManager-V1-Rotation)\n- [0.12.0](/ruby/docs/reference/google-cloud-secret_manager-v1/0.12.0/Google-Cloud-SecretManager-V1-Rotation)\n- [0.11.3](/ruby/docs/reference/google-cloud-secret_manager-v1/0.11.3/Google-Cloud-SecretManager-V1-Rotation) \nReference documentation and code samples for the Secret Manager V1 API class Google::Cloud::SecretManager::V1::Rotation.\n\nThe rotation time and period for a\n[Secret](/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-Secret \"Google::Cloud::SecretManager::V1::Secret (class)\"). At next_rotation_time, Secret\nManager will send a Pub/Sub notification to the topics configured on the\nSecret. [Secret.topics](/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-Secret#Google__Cloud__SecretManager__V1__Secret_topics_instance_ \"Google::Cloud::SecretManager::V1::Secret#topics (method)\") must be\nset to configure rotation. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #next_rotation_time\n\n def next_rotation_time() -\u003e ::Google::Protobuf::Timestamp\n\n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Optional. Timestamp in UTC at which the [Secret](/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-Secret \"Google::Cloud::SecretManager::V1::Secret (class)\") is scheduled to rotate. Cannot be set to less than 300s (5 min) in the future and at most 3153600000s (100 years).\n\n\n [next_rotation_time](/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-Rotation#Google__Cloud__SecretManager__V1__Rotation_next_rotation_time_instance_ \"Google::Cloud::SecretManager::V1::Rotation#next_rotation_time (method)\")\n MUST be set if\n [rotation_period](/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-Rotation#Google__Cloud__SecretManager__V1__Rotation_rotation_period_instance_ \"Google::Cloud::SecretManager::V1::Rotation#rotation_period (method)\")\n is set.\n\n### #next_rotation_time=\n\n def next_rotation_time=(value) -\u003e ::Google::Protobuf::Timestamp\n\n**Parameter**\n\n- **value** ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Optional. Timestamp in UTC at which the [Secret](/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-Secret \"Google::Cloud::SecretManager::V1::Secret (class)\") is scheduled to rotate. Cannot be set to less than 300s (5 min) in the future and at most 3153600000s (100 years).\n\n\n [next_rotation_time](/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-Rotation#Google__Cloud__SecretManager__V1__Rotation_next_rotation_time_instance_ \"Google::Cloud::SecretManager::V1::Rotation#next_rotation_time (method)\")\n MUST be set if\n [rotation_period](/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-Rotation#Google__Cloud__SecretManager__V1__Rotation_rotation_period_instance_ \"Google::Cloud::SecretManager::V1::Rotation#rotation_period (method)\")\nis set. \n**Returns**\n\n- ([::Google::Protobuf::Timestamp](./Google-Protobuf-Timestamp)) --- Optional. Timestamp in UTC at which the [Secret](/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-Secret \"Google::Cloud::SecretManager::V1::Secret (class)\") is scheduled to rotate. Cannot be set to less than 300s (5 min) in the future and at most 3153600000s (100 years).\n\n\n [next_rotation_time](/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-Rotation#Google__Cloud__SecretManager__V1__Rotation_next_rotation_time_instance_ \"Google::Cloud::SecretManager::V1::Rotation#next_rotation_time (method)\")\n MUST be set if\n [rotation_period](/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-Rotation#Google__Cloud__SecretManager__V1__Rotation_rotation_period_instance_ \"Google::Cloud::SecretManager::V1::Rotation#rotation_period (method)\")\n is set.\n\n### #rotation_period\n\n def rotation_period() -\u003e ::Google::Protobuf::Duration\n\n**Returns**\n\n- ([::Google::Protobuf::Duration](./Google-Protobuf-Duration)) --- Input only. The Duration between rotation notifications. Must be in seconds and at least 3600s (1h) and at most 3153600000s (100 years).\n\n\n If\n [rotation_period](/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-Rotation#Google__Cloud__SecretManager__V1__Rotation_rotation_period_instance_ \"Google::Cloud::SecretManager::V1::Rotation#rotation_period (method)\")\n is set,\n [next_rotation_time](/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-Rotation#Google__Cloud__SecretManager__V1__Rotation_next_rotation_time_instance_ \"Google::Cloud::SecretManager::V1::Rotation#next_rotation_time (method)\")\n must be set.\n [next_rotation_time](/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-Rotation#Google__Cloud__SecretManager__V1__Rotation_next_rotation_time_instance_ \"Google::Cloud::SecretManager::V1::Rotation#next_rotation_time (method)\")\n will be advanced by this period when the service automatically sends\n rotation notifications.\n\n### #rotation_period=\n\n def rotation_period=(value) -\u003e ::Google::Protobuf::Duration\n\n**Parameter**\n\n- **value** ([::Google::Protobuf::Duration](./Google-Protobuf-Duration)) --- Input only. The Duration between rotation notifications. Must be in seconds and at least 3600s (1h) and at most 3153600000s (100 years).\n\n\n If\n [rotation_period](/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-Rotation#Google__Cloud__SecretManager__V1__Rotation_rotation_period_instance_ \"Google::Cloud::SecretManager::V1::Rotation#rotation_period (method)\")\n is set,\n [next_rotation_time](/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-Rotation#Google__Cloud__SecretManager__V1__Rotation_next_rotation_time_instance_ \"Google::Cloud::SecretManager::V1::Rotation#next_rotation_time (method)\")\n must be set.\n [next_rotation_time](/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-Rotation#Google__Cloud__SecretManager__V1__Rotation_next_rotation_time_instance_ \"Google::Cloud::SecretManager::V1::Rotation#next_rotation_time (method)\")\n will be advanced by this period when the service automatically sends\nrotation notifications. \n**Returns**\n\n- ([::Google::Protobuf::Duration](./Google-Protobuf-Duration)) --- Input only. The Duration between rotation notifications. Must be in seconds and at least 3600s (1h) and at most 3153600000s (100 years).\n\n\n If\n [rotation_period](/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-Rotation#Google__Cloud__SecretManager__V1__Rotation_rotation_period_instance_ \"Google::Cloud::SecretManager::V1::Rotation#rotation_period (method)\")\n is set,\n [next_rotation_time](/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-Rotation#Google__Cloud__SecretManager__V1__Rotation_next_rotation_time_instance_ \"Google::Cloud::SecretManager::V1::Rotation#next_rotation_time (method)\")\n must be set.\n [next_rotation_time](/ruby/docs/reference/google-cloud-secret_manager-v1/latest/Google-Cloud-SecretManager-V1-Rotation#Google__Cloud__SecretManager__V1__Rotation_next_rotation_time_instance_ \"Google::Cloud::SecretManager::V1::Rotation#next_rotation_time (method)\")\n will be advanced by this period when the service automatically sends\n rotation notifications."]]