public sealed class Rotation : IMessage<Rotation>, IEquatable<Rotation>, IDeepCloneable<Rotation>, IBufferMessage, IMessage
Reference documentation and code samples for the Secret Manager v1 API class Rotation.
The rotation time and period for a
[Secret][google.cloud.secretmanager.v1.Secret]. At next_rotation_time, Secret
Manager will send a Pub/Sub notification to the topics configured on the
Secret. [Secret.topics][google.cloud.secretmanager.v1.Secret.topics] must be
set to configure rotation.
Optional. Timestamp in UTC at which the
[Secret][google.cloud.secretmanager.v1.Secret] is scheduled to rotate.
Cannot be set to less than 300s (5 min) in the future and at most
3153600000s (100 years).
[next_rotation_time][google.cloud.secretmanager.v1.Rotation.next_rotation_time]
MUST be set if
[rotation_period][google.cloud.secretmanager.v1.Rotation.rotation_period]
is set.
Input only. The Duration between rotation notifications. Must be in seconds
and at least 3600s (1h) and at most 3153600000s (100 years).
If
[rotation_period][google.cloud.secretmanager.v1.Rotation.rotation_period]
is set,
[next_rotation_time][google.cloud.secretmanager.v1.Rotation.next_rotation_time]
must be set.
[next_rotation_time][google.cloud.secretmanager.v1.Rotation.next_rotation_time]
will be advanced by this period when the service automatically sends
rotation notifications.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe latest version of the \u003ccode\u003eRotation\u003c/code\u003e class within the Google Cloud Secret Manager v1 API is 2.5.0, with multiple previous versions available, dating back to 1.3.0.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eRotation\u003c/code\u003e class is used to manage the rotation time and period for a Secret, which will trigger Pub/Sub notifications to configured topics.\u003c/p\u003e\n"],["\u003cp\u003eThe class implements interfaces like \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, and inherits from the base \u003ccode\u003eobject\u003c/code\u003e class.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eRotation\u003c/code\u003e objects have properties for \u003ccode\u003eNextRotationTime\u003c/code\u003e, a Timestamp indicating the next scheduled rotation, and \u003ccode\u003eRotationPeriod\u003c/code\u003e, a Duration defining the time between rotation notifications.\u003c/p\u003e\n"],["\u003cp\u003eWhen setting a \u003ccode\u003eRotationPeriod\u003c/code\u003e, it is necessary to set the \u003ccode\u003eNextRotationTime\u003c/code\u003e as well, and the period must be between 1 hour (3600 seconds) and 100 years (3153600000 seconds), with the \u003ccode\u003eNextRotationTime\u003c/code\u003e also being between 5 minutes and 100 years.\u003c/p\u003e\n"]]],[],null,["# Secret Manager v1 API - Class Rotation (2.6.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.6.0 (latest)](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Rotation)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.5.0/Google.Cloud.SecretManager.V1.Rotation)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.4.0/Google.Cloud.SecretManager.V1.Rotation)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.3.0/Google.Cloud.SecretManager.V1.Rotation)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.2.0/Google.Cloud.SecretManager.V1.Rotation)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.1.0/Google.Cloud.SecretManager.V1.Rotation)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/2.0.0/Google.Cloud.SecretManager.V1.Rotation)\n- [1.9.0](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.9.0/Google.Cloud.SecretManager.V1.Rotation)\n- [1.8.0](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.8.0/Google.Cloud.SecretManager.V1.Rotation)\n- [1.7.0](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.7.0/Google.Cloud.SecretManager.V1.Rotation)\n- [1.6.0](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.6.0/Google.Cloud.SecretManager.V1.Rotation)\n- [1.5.0](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.5.0/Google.Cloud.SecretManager.V1.Rotation)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.4.0/Google.Cloud.SecretManager.V1.Rotation)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/1.3.0/Google.Cloud.SecretManager.V1.Rotation) \n\n public sealed class Rotation : IMessage\u003cRotation\u003e, IEquatable\u003cRotation\u003e, IDeepCloneable\u003cRotation\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Secret Manager v1 API class Rotation.\n\nThe rotation time and period for a\n\\[Secret\\]\\[google.cloud.secretmanager.v1.Secret\\]. At next_rotation_time, Secret\nManager will send a Pub/Sub notification to the topics configured on the\nSecret. \\[Secret.topics\\]\\[google.cloud.secretmanager.v1.Secret.topics\\] must be\nset to configure rotation. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Rotation \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Rotation](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Rotation), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Rotation](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Rotation), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Rotation](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1.Rotation), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.SecretManager.V1](/dotnet/docs/reference/Google.Cloud.SecretManager.V1/latest/Google.Cloud.SecretManager.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.SecretManager.V1.dll\n\nConstructors\n------------\n\n### Rotation()\n\n public Rotation()\n\n### Rotation(Rotation)\n\n public Rotation(Rotation other)\n\nProperties\n----------\n\n### NextRotationTime\n\n public Timestamp NextRotationTime { get; set; }\n\nOptional. Timestamp in UTC at which the\n\\[Secret\\]\\[google.cloud.secretmanager.v1.Secret\\] is scheduled to rotate.\nCannot be set to less than 300s (5 min) in the future and at most\n3153600000s (100 years).\n\n\\[next_rotation_time\\]\\[google.cloud.secretmanager.v1.Rotation.next_rotation_time\\]\nMUST be set if\n\\[rotation_period\\]\\[google.cloud.secretmanager.v1.Rotation.rotation_period\\]\nis set.\n\n### RotationPeriod\n\n public Duration RotationPeriod { get; set; }\n\nInput only. The Duration between rotation notifications. Must be in seconds\nand at least 3600s (1h) and at most 3153600000s (100 years).\n\nIf\n\\[rotation_period\\]\\[google.cloud.secretmanager.v1.Rotation.rotation_period\\]\nis set,\n\\[next_rotation_time\\]\\[google.cloud.secretmanager.v1.Rotation.next_rotation_time\\]\nmust be set.\n\\[next_rotation_time\\]\\[google.cloud.secretmanager.v1.Rotation.next_rotation_time\\]\nwill be advanced by this period when the service automatically sends\nrotation notifications."]]