Class: Google::Apis::GkebackupV1::BackupPlan
- Inherits:
-
Object
- Object
- Google::Apis::GkebackupV1::BackupPlan
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/gkebackup_v1/classes.rb,
lib/google/apis/gkebackup_v1/representations.rb,
lib/google/apis/gkebackup_v1/representations.rb
Overview
Defines the configuration and scheduling for a "line" of Backups.
Instance Attribute Summary collapse
-
#backup_channel ⇒ String
Output only.
-
#backup_config ⇒ Google::Apis::GkebackupV1::BackupConfig
BackupConfig defines the configuration of Backups created via this BackupPlan.
-
#backup_schedule ⇒ Google::Apis::GkebackupV1::Schedule
Defines scheduling parameters for automatically creating Backups via this BackupPlan.
-
#cluster ⇒ String
Required.
-
#create_time ⇒ String
Output only.
-
#deactivated ⇒ Boolean
(also: #deactivated?)
Optional.
-
#description ⇒ String
Optional.
-
#etag ⇒ String
Output only.
-
#labels ⇒ Hash<String,String>
Optional.
-
#last_successful_backup_time ⇒ String
Output only.
-
#name ⇒ String
Output only.
-
#protected_namespace_count ⇒ Fixnum
Output only.
-
#protected_pod_count ⇒ Fixnum
Output only.
-
#retention_policy ⇒ Google::Apis::GkebackupV1::RetentionPolicy
RetentionPolicy defines a Backup retention policy for a BackupPlan.
-
#rpo_risk_level ⇒ Fixnum
Output only.
-
#rpo_risk_reason ⇒ String
Output only.
-
#state ⇒ String
Output only.
-
#state_reason ⇒ String
Output only.
-
#uid ⇒ String
Output only.
-
#update_time ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ BackupPlan
constructor
A new instance of BackupPlan.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ BackupPlan
Returns a new instance of BackupPlan.
970 971 972 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 970 def initialize(**args) update!(**args) end |
Instance Attribute Details
#backup_channel ⇒ String
Output only. The fully qualified name of the BackupChannel to be used to
create a backup. This field is set only if the cluster being backed up is in a
different project. projects/*/locations/*/backupChannels/*
Corresponds to the JSON property backupChannel
845 846 847 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 845 def backup_channel @backup_channel end |
#backup_config ⇒ Google::Apis::GkebackupV1::BackupConfig
BackupConfig defines the configuration of Backups created via this BackupPlan.
Corresponds to the JSON property backupConfig
850 851 852 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 850 def backup_config @backup_config end |
#backup_schedule ⇒ Google::Apis::GkebackupV1::Schedule
Defines scheduling parameters for automatically creating Backups via this
BackupPlan.
Corresponds to the JSON property backupSchedule
856 857 858 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 856 def backup_schedule @backup_schedule end |
#cluster ⇒ String
Required. Immutable. The source cluster from which Backups will be created via
this BackupPlan. Valid formats: - projects/*/locations/*/clusters/* -
projects/*/zones/*/clusters/*
Corresponds to the JSON property cluster
863 864 865 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 863 def cluster @cluster end |
#create_time ⇒ String
Output only. The timestamp when this BackupPlan resource was created.
Corresponds to the JSON property createTime
868 869 870 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 868 def create_time @create_time end |
#deactivated ⇒ Boolean Also known as: deactivated?
Optional. This flag indicates whether this BackupPlan has been deactivated.
Setting this field to True locks the BackupPlan such that no further updates
will be allowed (except deletes), including the deactivated field itself. It
also prevents any new Backups from being created via this BackupPlan (
including scheduled Backups). Default: False
Corresponds to the JSON property deactivated
877 878 879 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 877 def deactivated @deactivated end |
#description ⇒ String
Optional. User specified descriptive string for this BackupPlan.
Corresponds to the JSON property description
883 884 885 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 883 def description @description end |
#etag ⇒ String
Output only. etag is used for optimistic concurrency control as a way to
help prevent simultaneous updates of a backup plan from overwriting each other.
It is strongly suggested that systems make use of the 'etag' in the read-
modify-write cycle to perform BackupPlan updates in order to avoid race
conditions: An etag is returned in the response to GetBackupPlan, and
systems are expected to put that etag in the request to UpdateBackupPlan or
DeleteBackupPlan to ensure that their change will be applied to the same
version of the resource.
Corresponds to the JSON property etag
895 896 897 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 895 def etag @etag end |
#labels ⇒ Hash<String,String>
Optional. A set of custom labels supplied by user.
Corresponds to the JSON property labels
900 901 902 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 900 def labels @labels end |
#last_successful_backup_time ⇒ String
Output only. Completion time of the last successful Backup. This is sourced
from a successful Backup's complete_time field. This field is added to
maintain consistency with BackupPlanBinding to display last successful backup
time.
Corresponds to the JSON property lastSuccessfulBackupTime
908 909 910 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 908 def last_successful_backup_time @last_successful_backup_time end |
#name ⇒ String
Output only. Identifier. The full name of the BackupPlan resource. Format:
projects/*/locations/*/backupPlans/*
Corresponds to the JSON property name
914 915 916 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 914 def name @name end |
#protected_namespace_count ⇒ Fixnum
Output only. The number of user managed namespaces backed up in the last
successful Backup created via this BackupPlan.
Corresponds to the JSON property protectedNamespaceCount
920 921 922 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 920 def protected_namespace_count @protected_namespace_count end |
#protected_pod_count ⇒ Fixnum
Output only. The number of Kubernetes Pods backed up in the last successful
Backup created via this BackupPlan.
Corresponds to the JSON property protectedPodCount
926 927 928 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 926 def protected_pod_count @protected_pod_count end |
#retention_policy ⇒ Google::Apis::GkebackupV1::RetentionPolicy
RetentionPolicy defines a Backup retention policy for a BackupPlan.
Corresponds to the JSON property retentionPolicy
931 932 933 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 931 def retention_policy @retention_policy end |
#rpo_risk_level ⇒ Fixnum
Output only. A number that represents the current risk level of this
BackupPlan from RPO perspective with 1 being no risk and 5 being highest risk.
Corresponds to the JSON property rpoRiskLevel
937 938 939 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 937 def rpo_risk_level @rpo_risk_level end |
#rpo_risk_reason ⇒ String
Output only. Human-readable description of why the BackupPlan is in the
current rpo_risk_level and action items if any.
Corresponds to the JSON property rpoRiskReason
943 944 945 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 943 def rpo_risk_reason @rpo_risk_reason end |
#state ⇒ String
Output only. State of the BackupPlan. This State field reflects the various
stages a BackupPlan can be in during the Create operation. It will be set to "
DEACTIVATED" if the BackupPlan is deactivated on an Update
Corresponds to the JSON property state
950 951 952 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 950 def state @state end |
#state_reason ⇒ String
Output only. Human-readable description of why BackupPlan is in the current
state. This field is only meant for human readability and should not be used
programmatically as this field is not guaranteed to be consistent.
Corresponds to the JSON property stateReason
957 958 959 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 957 def state_reason @state_reason end |
#uid ⇒ String
Output only. Server generated global unique identifier of UUID format.
Corresponds to the JSON property uid
963 964 965 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 963 def uid @uid end |
#update_time ⇒ String
Output only. The timestamp when this BackupPlan resource was last updated.
Corresponds to the JSON property updateTime
968 969 970 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 968 def update_time @update_time end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 |
# File 'lib/google/apis/gkebackup_v1/classes.rb', line 975 def update!(**args) @backup_channel = args[:backup_channel] if args.key?(:backup_channel) @backup_config = args[:backup_config] if args.key?(:backup_config) @backup_schedule = args[:backup_schedule] if args.key?(:backup_schedule) @cluster = args[:cluster] if args.key?(:cluster) @create_time = args[:create_time] if args.key?(:create_time) @deactivated = args[:deactivated] if args.key?(:deactivated) @description = args[:description] if args.key?(:description) @etag = args[:etag] if args.key?(:etag) @labels = args[:labels] if args.key?(:labels) @last_successful_backup_time = args[:last_successful_backup_time] if args.key?(:last_successful_backup_time) @name = args[:name] if args.key?(:name) @protected_namespace_count = args[:protected_namespace_count] if args.key?(:protected_namespace_count) @protected_pod_count = args[:protected_pod_count] if args.key?(:protected_pod_count) @retention_policy = args[:retention_policy] if args.key?(:retention_policy) @rpo_risk_level = args[:rpo_risk_level] if args.key?(:rpo_risk_level) @rpo_risk_reason = args[:rpo_risk_reason] if args.key?(:rpo_risk_reason) @state = args[:state] if args.key?(:state) @state_reason = args[:state_reason] if args.key?(:state_reason) @uid = args[:uid] if args.key?(:uid) @update_time = args[:update_time] if args.key?(:update_time) end |