diff --git a/discovery/redis-v1.json b/discovery/redis-v1.json index 9ce2a90e23..8763094c6d 100644 --- a/discovery/redis-v1.json +++ b/discovery/redis-v1.json @@ -371,6 +371,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "rescheduleClusterMaintenance": { + "description": "Reschedules upcoming maintenance event.", + "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:rescheduleClusterMaintenance", + "httpMethod": "POST", + "id": "redis.projects.locations.clusters.rescheduleClusterMaintenance", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Redis Cluster instance resource name using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` where `location_id` refers to a GCP region.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:rescheduleClusterMaintenance", + "request": { + "$ref": "RescheduleClusterMaintenanceRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -821,7 +849,7 @@ } } }, - "revision": "20240812", + "revision": "20240822", "rootUrl": "https://redis.googleapis.com/", "schemas": { "AOFConfig": { @@ -840,7 +868,7 @@ "Not set. Default: EVERYSEC", "Never fsync. Normally Linux will flush data every 30 seconds with this configuration, but it's up to the kernel's exact tuning.", "fsync every second. Fast enough, and you may lose 1 second of data if there is a disaster", - "fsync every time new commands are appended to the AOF. It has the best data loss protection at the cost of performance" + "fsync every time new write commands are appended to the AOF. It has the best data loss protection at the cost of performance" ], "type": "string" } @@ -851,6 +879,10 @@ "description": "Configuration for availability of database instance", "id": "AvailabilityConfiguration", "properties": { + "automaticFailoverRoutingConfigured": { + "description": "Checks for existence of (multi-cluster) routing configuration that allows automatic failover to a different zone/region in case of an outage. Applicable to Bigtable resources.", + "type": "boolean" + }, "availabilityType": { "description": "Availability type. Potential values: * `ZONAL`: The instance serves data from only one zone. Outages in that zone affect data accessibility. * `REGIONAL`: The instance can serve data from more than one zone in a region (it is highly available).", "enum": [ @@ -1003,6 +1035,15 @@ "readOnly": true, "type": "array" }, + "maintenancePolicy": { + "$ref": "ClusterMaintenancePolicy", + "description": "Optional. ClusterMaintenancePolicy determines when to allow or deny updates." + }, + "maintenanceSchedule": { + "$ref": "ClusterMaintenanceSchedule", + "description": "Output only. ClusterMaintenanceSchedule Output only Published maintenance schedule.", + "readOnly": true + }, "name": { "description": "Required. Identifier. Unique name of the resource in this scope including project and location using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`", "type": "string" @@ -1123,6 +1164,57 @@ }, "type": "object" }, + "ClusterMaintenancePolicy": { + "description": "Maintenance policy per cluster.", + "id": "ClusterMaintenancePolicy", + "properties": { + "createTime": { + "description": "Output only. The time when the policy was created i.e. Maintenance Window or Deny Period was assigned.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the policy was updated i.e. Maintenance Window or Deny Period was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "weeklyMaintenanceWindow": { + "description": "Optional. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_maintenance_window is expected to be one.", + "items": { + "$ref": "ClusterWeeklyMaintenanceWindow" + }, + "type": "array" + } + }, + "type": "object" + }, + "ClusterMaintenanceSchedule": { + "description": "Upcoming maitenance schedule.", + "id": "ClusterMaintenanceSchedule", + "properties": { + "endTime": { + "description": "Output only. The end time of any upcoming scheduled maintenance for this instance.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "scheduleDeadlineTime": { + "description": "Output only. The deadline that the maintenance schedule start time can not go beyond, including reschedule.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "startTime": { + "description": "Output only. The start time of any upcoming scheduled maintenance for this instance.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "ClusterPersistenceConfig": { "description": "Configuration of the persistence functionality.", "id": "ClusterPersistenceConfig", @@ -1154,6 +1246,46 @@ }, "type": "object" }, + "ClusterWeeklyMaintenanceWindow": { + "description": "Time window specified for weekly operations.", + "id": "ClusterWeeklyMaintenanceWindow", + "properties": { + "day": { + "description": "Allows to define schedule that runs specified day of the week.", + "enum": [ + "DAY_OF_WEEK_UNSPECIFIED", + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + "SUNDAY" + ], + "enumDescriptions": [ + "The day of the week is unspecified.", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ], + "type": "string" + }, + "duration": { + "description": "Duration of the time window.", + "format": "google-duration", + "type": "string" + }, + "startTime": { + "$ref": "TimeOfDay", + "description": "Start time of the window in UTC." + } + }, + "type": "object" + }, "Compliance": { "description": "Contains compliance information about a security standard indicating unmet recommendations.", "id": "Compliance", @@ -3351,6 +3483,32 @@ }, "type": "object" }, + "RescheduleClusterMaintenanceRequest": { + "description": "Request for rescheduling a cluster maintenance.", + "id": "RescheduleClusterMaintenanceRequest", + "properties": { + "rescheduleType": { + "description": "Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.", + "enum": [ + "RESCHEDULE_TYPE_UNSPECIFIED", + "IMMEDIATE", + "SPECIFIC_TIME" + ], + "enumDescriptions": [ + "Not set.", + "If the user wants to schedule the maintenance to happen now.", + "If the user wants to reschedule the maintenance to a specific time." + ], + "type": "string" + }, + "scheduleTime": { + "description": "Optional. Timestamp when the maintenance shall be rescheduled to if reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example `2012-11-15T16:19:00.094Z`.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "RescheduleMaintenanceRequest": { "description": "Request for RescheduleMaintenance.", "id": "RescheduleMaintenanceRequest", diff --git a/discovery/redis-v1beta1.json b/discovery/redis-v1beta1.json index 4ccc5bee1b..1bd9d05eb8 100644 --- a/discovery/redis-v1beta1.json +++ b/discovery/redis-v1beta1.json @@ -371,6 +371,34 @@ "scopes": [ "https://www.googleapis.com/auth/cloud-platform" ] + }, + "rescheduleClusterMaintenance": { + "description": "Reschedules upcoming maintenance event.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}:rescheduleClusterMaintenance", + "httpMethod": "POST", + "id": "redis.projects.locations.clusters.rescheduleClusterMaintenance", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. Redis Cluster instance resource name using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` where `location_id` refers to a GCP region.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}:rescheduleClusterMaintenance", + "request": { + "$ref": "RescheduleClusterMaintenanceRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] } } }, @@ -821,7 +849,7 @@ } } }, - "revision": "20240812", + "revision": "20240822", "rootUrl": "https://redis.googleapis.com/", "schemas": { "AOFConfig": { @@ -840,7 +868,7 @@ "Not set. Default: EVERYSEC", "Never fsync. Normally Linux will flush data every 30 seconds with this configuration, but it's up to the kernel's exact tuning.", "fsync every second. Fast enough, and you may lose 1 second of data if there is a disaster", - "fsync every time new commands are appended to the AOF. It has the best data loss protection at the cost of performance" + "fsync every time new write commands are appended to the AOF. It has the best data loss protection at the cost of performance" ], "type": "string" } @@ -851,6 +879,10 @@ "description": "Configuration for availability of database instance", "id": "AvailabilityConfiguration", "properties": { + "automaticFailoverRoutingConfigured": { + "description": "Checks for existence of (multi-cluster) routing configuration that allows automatic failover to a different zone/region in case of an outage. Applicable to Bigtable resources.", + "type": "boolean" + }, "availabilityType": { "description": "Availability type. Potential values: * `ZONAL`: The instance serves data from only one zone. Outages in that zone affect data accessibility. * `REGIONAL`: The instance can serve data from more than one zone in a region (it is highly available).", "enum": [ @@ -1003,6 +1035,15 @@ "readOnly": true, "type": "array" }, + "maintenancePolicy": { + "$ref": "ClusterMaintenancePolicy", + "description": "Optional. ClusterMaintenancePolicy determines when to allow or deny updates." + }, + "maintenanceSchedule": { + "$ref": "ClusterMaintenanceSchedule", + "description": "Output only. ClusterMaintenanceSchedule Output only Published maintenance schedule.", + "readOnly": true + }, "name": { "description": "Required. Identifier. Unique name of the resource in this scope including project and location using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`", "type": "string" @@ -1123,6 +1164,57 @@ }, "type": "object" }, + "ClusterMaintenancePolicy": { + "description": "Maintenance policy per cluster.", + "id": "ClusterMaintenancePolicy", + "properties": { + "createTime": { + "description": "Output only. The time when the policy was created i.e. Maintenance Window or Deny Period was assigned.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "updateTime": { + "description": "Output only. The time when the policy was updated i.e. Maintenance Window or Deny Period was updated.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "weeklyMaintenanceWindow": { + "description": "Optional. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_maintenance_window is expected to be one.", + "items": { + "$ref": "ClusterWeeklyMaintenanceWindow" + }, + "type": "array" + } + }, + "type": "object" + }, + "ClusterMaintenanceSchedule": { + "description": "Upcoming maitenance schedule.", + "id": "ClusterMaintenanceSchedule", + "properties": { + "endTime": { + "description": "Output only. The end time of any upcoming scheduled maintenance for this instance.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "scheduleDeadlineTime": { + "description": "Output only. The deadline that the maintenance schedule start time can not go beyond, including reschedule.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "startTime": { + "description": "Output only. The start time of any upcoming scheduled maintenance for this instance.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, "ClusterPersistenceConfig": { "description": "Configuration of the persistence functionality.", "id": "ClusterPersistenceConfig", @@ -1154,6 +1246,46 @@ }, "type": "object" }, + "ClusterWeeklyMaintenanceWindow": { + "description": "Time window specified for weekly operations.", + "id": "ClusterWeeklyMaintenanceWindow", + "properties": { + "day": { + "description": "Allows to define schedule that runs specified day of the week.", + "enum": [ + "DAY_OF_WEEK_UNSPECIFIED", + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + "SUNDAY" + ], + "enumDescriptions": [ + "The day of the week is unspecified.", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ], + "type": "string" + }, + "duration": { + "description": "Duration of the time window.", + "format": "google-duration", + "type": "string" + }, + "startTime": { + "$ref": "TimeOfDay", + "description": "Start time of the window in UTC." + } + }, + "type": "object" + }, "Compliance": { "description": "Contains compliance information about a security standard indicating unmet recommendations.", "id": "Compliance", @@ -3358,6 +3490,32 @@ }, "type": "object" }, + "RescheduleClusterMaintenanceRequest": { + "description": "Request for rescheduling a cluster maintenance.", + "id": "RescheduleClusterMaintenanceRequest", + "properties": { + "rescheduleType": { + "description": "Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.", + "enum": [ + "RESCHEDULE_TYPE_UNSPECIFIED", + "IMMEDIATE", + "SPECIFIC_TIME" + ], + "enumDescriptions": [ + "Not set.", + "If the user wants to schedule the maintenance to happen now.", + "If the user wants to reschedule the maintenance to a specific time." + ], + "type": "string" + }, + "scheduleTime": { + "description": "Optional. Timestamp when the maintenance shall be rescheduled to if reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example `2012-11-15T16:19:00.094Z`.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, "RescheduleMaintenanceRequest": { "description": "Request for RescheduleMaintenance.", "id": "RescheduleMaintenanceRequest", diff --git a/src/apis/redis/v1.ts b/src/apis/redis/v1.ts index f6389cad28..825b607200 100644 --- a/src/apis/redis/v1.ts +++ b/src/apis/redis/v1.ts @@ -137,6 +137,10 @@ export namespace redis_v1 { * Configuration for availability of database instance */ export interface Schema$AvailabilityConfiguration { + /** + * Checks for existence of (multi-cluster) routing configuration that allows automatic failover to a different zone/region in case of an outage. Applicable to Bigtable resources. + */ + automaticFailoverRoutingConfigured?: boolean | null; /** * Availability type. Potential values: * `ZONAL`: The instance serves data from only one zone. Outages in that zone affect data accessibility. * `REGIONAL`: The instance can serve data from more than one zone in a region (it is highly available). */ @@ -226,6 +230,14 @@ export namespace redis_v1 { * Output only. Endpoints created on each given network, for Redis clients to connect to the cluster. Currently only one discovery endpoint is supported. */ discoveryEndpoints?: Schema$DiscoveryEndpoint[]; + /** + * Optional. ClusterMaintenancePolicy determines when to allow or deny updates. + */ + maintenancePolicy?: Schema$ClusterMaintenancePolicy; + /** + * Output only. ClusterMaintenanceSchedule Output only Published maintenance schedule. + */ + maintenanceSchedule?: Schema$ClusterMaintenanceSchedule; /** * Required. Identifier. Unique name of the resource in this scope including project and location using the form: `projects/{project_id\}/locations/{location_id\}/clusters/{cluster_id\}` */ @@ -287,6 +299,40 @@ export namespace redis_v1 { */ zoneDistributionConfig?: Schema$ZoneDistributionConfig; } + /** + * Maintenance policy per cluster. + */ + export interface Schema$ClusterMaintenancePolicy { + /** + * Output only. The time when the policy was created i.e. Maintenance Window or Deny Period was assigned. + */ + createTime?: string | null; + /** + * Output only. The time when the policy was updated i.e. Maintenance Window or Deny Period was updated. + */ + updateTime?: string | null; + /** + * Optional. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_maintenance_window is expected to be one. + */ + weeklyMaintenanceWindow?: Schema$ClusterWeeklyMaintenanceWindow[]; + } + /** + * Upcoming maitenance schedule. + */ + export interface Schema$ClusterMaintenanceSchedule { + /** + * Output only. The end time of any upcoming scheduled maintenance for this instance. + */ + endTime?: string | null; + /** + * Output only. The deadline that the maintenance schedule start time can not go beyond, including reschedule. + */ + scheduleDeadlineTime?: string | null; + /** + * Output only. The start time of any upcoming scheduled maintenance for this instance. + */ + startTime?: string | null; + } /** * Configuration of the persistence functionality. */ @@ -304,6 +350,23 @@ export namespace redis_v1 { */ rdbConfig?: Schema$RDBConfig; } + /** + * Time window specified for weekly operations. + */ + export interface Schema$ClusterWeeklyMaintenanceWindow { + /** + * Allows to define schedule that runs specified day of the week. + */ + day?: string | null; + /** + * Duration of the time window. + */ + duration?: string | null; + /** + * Start time of the window in UTC. + */ + startTime?: Schema$TimeOfDay; + } /** * Contains compliance information about a security standard indicating unmet recommendations. */ @@ -1265,6 +1328,19 @@ export namespace redis_v1 { */ uid?: string | null; } + /** + * Request for rescheduling a cluster maintenance. + */ + export interface Schema$RescheduleClusterMaintenanceRequest { + /** + * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well. + */ + rescheduleType?: string | null; + /** + * Optional. Timestamp when the maintenance shall be rescheduled to if reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example `2012-11-15T16:19:00.094Z`. + */ + scheduleTime?: string | null; + } /** * Request for RescheduleMaintenance. */ @@ -2201,6 +2277,97 @@ export namespace redis_v1 { return createAPIRequest(parameters); } } + + /** + * Reschedules upcoming maintenance event. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + rescheduleClusterMaintenance( + params: Params$Resource$Projects$Locations$Clusters$Rescheduleclustermaintenance, + options: StreamMethodOptions + ): GaxiosPromise; + rescheduleClusterMaintenance( + params?: Params$Resource$Projects$Locations$Clusters$Rescheduleclustermaintenance, + options?: MethodOptions + ): GaxiosPromise; + rescheduleClusterMaintenance( + params: Params$Resource$Projects$Locations$Clusters$Rescheduleclustermaintenance, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + rescheduleClusterMaintenance( + params: Params$Resource$Projects$Locations$Clusters$Rescheduleclustermaintenance, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + rescheduleClusterMaintenance( + params: Params$Resource$Projects$Locations$Clusters$Rescheduleclustermaintenance, + callback: BodyResponseCallback + ): void; + rescheduleClusterMaintenance( + callback: BodyResponseCallback + ): void; + rescheduleClusterMaintenance( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Clusters$Rescheduleclustermaintenance + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Clusters$Rescheduleclustermaintenance; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = + {} as Params$Resource$Projects$Locations$Clusters$Rescheduleclustermaintenance; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://redis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: (rootUrl + '/v1/{+name}:rescheduleClusterMaintenance').replace( + /([^:]\/)\/+/g, + '$1' + ), + method: 'POST', + apiVersion: '', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } } export interface Params$Resource$Projects$Locations$Clusters$Create @@ -2283,6 +2450,18 @@ export namespace redis_v1 { */ requestBody?: Schema$Cluster; } + export interface Params$Resource$Projects$Locations$Clusters$Rescheduleclustermaintenance + extends StandardParameters { + /** + * Required. Redis Cluster instance resource name using the form: `projects/{project_id\}/locations/{location_id\}/clusters/{cluster_id\}` where `location_id` refers to a GCP region. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$RescheduleClusterMaintenanceRequest; + } export class Resource$Projects$Locations$Instances { context: APIRequestContext; diff --git a/src/apis/redis/v1beta1.ts b/src/apis/redis/v1beta1.ts index 139b7ecac2..f045876f7a 100644 --- a/src/apis/redis/v1beta1.ts +++ b/src/apis/redis/v1beta1.ts @@ -137,6 +137,10 @@ export namespace redis_v1beta1 { * Configuration for availability of database instance */ export interface Schema$AvailabilityConfiguration { + /** + * Checks for existence of (multi-cluster) routing configuration that allows automatic failover to a different zone/region in case of an outage. Applicable to Bigtable resources. + */ + automaticFailoverRoutingConfigured?: boolean | null; /** * Availability type. Potential values: * `ZONAL`: The instance serves data from only one zone. Outages in that zone affect data accessibility. * `REGIONAL`: The instance can serve data from more than one zone in a region (it is highly available). */ @@ -226,6 +230,14 @@ export namespace redis_v1beta1 { * Output only. Endpoints created on each given network, for Redis clients to connect to the cluster. Currently only one discovery endpoint is supported. */ discoveryEndpoints?: Schema$DiscoveryEndpoint[]; + /** + * Optional. ClusterMaintenancePolicy determines when to allow or deny updates. + */ + maintenancePolicy?: Schema$ClusterMaintenancePolicy; + /** + * Output only. ClusterMaintenanceSchedule Output only Published maintenance schedule. + */ + maintenanceSchedule?: Schema$ClusterMaintenanceSchedule; /** * Required. Identifier. Unique name of the resource in this scope including project and location using the form: `projects/{project_id\}/locations/{location_id\}/clusters/{cluster_id\}` */ @@ -287,6 +299,40 @@ export namespace redis_v1beta1 { */ zoneDistributionConfig?: Schema$ZoneDistributionConfig; } + /** + * Maintenance policy per cluster. + */ + export interface Schema$ClusterMaintenancePolicy { + /** + * Output only. The time when the policy was created i.e. Maintenance Window or Deny Period was assigned. + */ + createTime?: string | null; + /** + * Output only. The time when the policy was updated i.e. Maintenance Window or Deny Period was updated. + */ + updateTime?: string | null; + /** + * Optional. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_maintenance_window is expected to be one. + */ + weeklyMaintenanceWindow?: Schema$ClusterWeeklyMaintenanceWindow[]; + } + /** + * Upcoming maitenance schedule. + */ + export interface Schema$ClusterMaintenanceSchedule { + /** + * Output only. The end time of any upcoming scheduled maintenance for this instance. + */ + endTime?: string | null; + /** + * Output only. The deadline that the maintenance schedule start time can not go beyond, including reschedule. + */ + scheduleDeadlineTime?: string | null; + /** + * Output only. The start time of any upcoming scheduled maintenance for this instance. + */ + startTime?: string | null; + } /** * Configuration of the persistence functionality. */ @@ -304,6 +350,23 @@ export namespace redis_v1beta1 { */ rdbConfig?: Schema$RDBConfig; } + /** + * Time window specified for weekly operations. + */ + export interface Schema$ClusterWeeklyMaintenanceWindow { + /** + * Allows to define schedule that runs specified day of the week. + */ + day?: string | null; + /** + * Duration of the time window. + */ + duration?: string | null; + /** + * Start time of the window in UTC. + */ + startTime?: Schema$TimeOfDay; + } /** * Contains compliance information about a security standard indicating unmet recommendations. */ @@ -1265,6 +1328,19 @@ export namespace redis_v1beta1 { */ uid?: string | null; } + /** + * Request for rescheduling a cluster maintenance. + */ + export interface Schema$RescheduleClusterMaintenanceRequest { + /** + * Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well. + */ + rescheduleType?: string | null; + /** + * Optional. Timestamp when the maintenance shall be rescheduled to if reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example `2012-11-15T16:19:00.094Z`. + */ + scheduleTime?: string | null; + } /** * Request for RescheduleMaintenance. */ @@ -2201,6 +2277,96 @@ export namespace redis_v1beta1 { return createAPIRequest(parameters); } } + + /** + * Reschedules upcoming maintenance event. + * + * @param params - Parameters for request + * @param options - Optionally override request options, such as `url`, `method`, and `encoding`. + * @param callback - Optional callback that handles the response. + * @returns A promise if used with async/await, or void if used with a callback. + */ + rescheduleClusterMaintenance( + params: Params$Resource$Projects$Locations$Clusters$Rescheduleclustermaintenance, + options: StreamMethodOptions + ): GaxiosPromise; + rescheduleClusterMaintenance( + params?: Params$Resource$Projects$Locations$Clusters$Rescheduleclustermaintenance, + options?: MethodOptions + ): GaxiosPromise; + rescheduleClusterMaintenance( + params: Params$Resource$Projects$Locations$Clusters$Rescheduleclustermaintenance, + options: StreamMethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + rescheduleClusterMaintenance( + params: Params$Resource$Projects$Locations$Clusters$Rescheduleclustermaintenance, + options: MethodOptions | BodyResponseCallback, + callback: BodyResponseCallback + ): void; + rescheduleClusterMaintenance( + params: Params$Resource$Projects$Locations$Clusters$Rescheduleclustermaintenance, + callback: BodyResponseCallback + ): void; + rescheduleClusterMaintenance( + callback: BodyResponseCallback + ): void; + rescheduleClusterMaintenance( + paramsOrCallback?: + | Params$Resource$Projects$Locations$Clusters$Rescheduleclustermaintenance + | BodyResponseCallback + | BodyResponseCallback, + optionsOrCallback?: + | MethodOptions + | StreamMethodOptions + | BodyResponseCallback + | BodyResponseCallback, + callback?: + | BodyResponseCallback + | BodyResponseCallback + ): void | GaxiosPromise | GaxiosPromise { + let params = (paramsOrCallback || + {}) as Params$Resource$Projects$Locations$Clusters$Rescheduleclustermaintenance; + let options = (optionsOrCallback || {}) as MethodOptions; + + if (typeof paramsOrCallback === 'function') { + callback = paramsOrCallback; + params = + {} as Params$Resource$Projects$Locations$Clusters$Rescheduleclustermaintenance; + options = {}; + } + + if (typeof optionsOrCallback === 'function') { + callback = optionsOrCallback; + options = {}; + } + + const rootUrl = options.rootUrl || 'https://redis.googleapis.com/'; + const parameters = { + options: Object.assign( + { + url: ( + rootUrl + '/v1beta1/{+name}:rescheduleClusterMaintenance' + ).replace(/([^:]\/)\/+/g, '$1'), + method: 'POST', + apiVersion: '', + }, + options + ), + params, + requiredParams: ['name'], + pathParams: ['name'], + context: this.context, + }; + if (callback) { + createAPIRequest( + parameters, + callback as BodyResponseCallback + ); + } else { + return createAPIRequest(parameters); + } + } } export interface Params$Resource$Projects$Locations$Clusters$Create @@ -2283,6 +2449,18 @@ export namespace redis_v1beta1 { */ requestBody?: Schema$Cluster; } + export interface Params$Resource$Projects$Locations$Clusters$Rescheduleclustermaintenance + extends StandardParameters { + /** + * Required. Redis Cluster instance resource name using the form: `projects/{project_id\}/locations/{location_id\}/clusters/{cluster_id\}` where `location_id` refers to a GCP region. + */ + name?: string; + + /** + * Request body metadata + */ + requestBody?: Schema$RescheduleClusterMaintenanceRequest; + } export class Resource$Projects$Locations$Instances { context: APIRequestContext;