Class: Google::Apis::SecretmanagerV1::Rotation

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/secretmanager_v1/classes.rb,
lib/google/apis/secretmanager_v1/representations.rb,
lib/google/apis/secretmanager_v1/representations.rb

Overview

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.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Rotation

Returns a new instance of Rotation.



788
789
790
# File 'lib/google/apis/secretmanager_v1/classes.rb', line 788

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#next_rotation_timeString

Optional. Timestamp in UTC at which the Secret is scheduled to rotate. next_rotation_time MUST be set if rotation_period is set. Corresponds to the JSON property nextRotationTime

Returns:

  • (String)


777
778
779
# File 'lib/google/apis/secretmanager_v1/classes.rb', line 777

def next_rotation_time
  @next_rotation_time
end

#rotation_periodString

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 is set, next_rotation_time must be set. next_rotation_time will be advanced by this period when the service automatically sends rotation notifications. Corresponds to the JSON property rotationPeriod

Returns:

  • (String)


786
787
788
# File 'lib/google/apis/secretmanager_v1/classes.rb', line 786

def rotation_period
  @rotation_period
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



793
794
795
796
# File 'lib/google/apis/secretmanager_v1/classes.rb', line 793

def update!(**args)
  @next_rotation_time = args[:next_rotation_time] if args.key?(:next_rotation_time)
  @rotation_period = args[:rotation_period] if args.key?(:rotation_period)
end