# Secret Manager v1beta2 API - Class Rotation (1.0.0-beta04)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [1.0.0-beta04 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2.Rotation)
- [1.0.0-beta03](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/1.0.0-beta03/Google.Cloud.SecretManager.V1Beta2.Rotation)

    public sealed class Rotation : IMessage<Rotation>, IEquatable<Rotation>, IDeepCloneable<Rotation>, IBufferMessage, IMessage

Reference documentation and code samples for the Secret Manager v1beta2 API class Rotation.

The rotation time and period for a
\[Secret\]\[google.cloud.secretmanager.v1beta2.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.v1beta2.Secret.topics\]
must be set to configure rotation.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> Rotation

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Rotation](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2.Rotation), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Rotation](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2.Rotation), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Rotation](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2.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)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.SecretManager.V1Beta2](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2)

## Assembly

Google.Cloud.SecretManager.V1Beta2.dll

## Constructors

### Rotation()

    public Rotation()

### Rotation(Rotation)

    public Rotation(Rotation other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.SecretManager.V1Beta2/latest/Google.Cloud.SecretManager.V1Beta2.Rotation` |

## Properties

### NextRotationTime

    public Timestamp NextRotationTime { get; set; }

Optional. Timestamp in UTC at which the
\[Secret\]\[google.cloud.secretmanager.v1beta2.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.v1beta2.Rotation.next_rotation_time\]
MUST be set if
\[rotation_period\]\[google.cloud.secretmanager.v1beta2.Rotation.rotation_period\]
is set.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |

### RotationPeriod

    public Duration RotationPeriod { get; 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.v1beta2.Rotation.rotation_period\]
is set,
\[next_rotation_time\]\[google.cloud.secretmanager.v1beta2.Rotation.next_rotation_time\]
must be set.
\[next_rotation_time\]\[google.cloud.secretmanager.v1beta2.Rotation.next_rotation_time\]
will be advanced by this period when the service automatically sends
rotation notifications.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Duration.html` |   |