/// <summary> /// Retrieves the list of Operation resources contained within the specified zone. /// Documentation https://developers.google.com/replicapoolupdater/v1beta1/reference/zoneOperations/list /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated replicapoolupdater service.</param> /// <param name="project">Name of the project scoping this request.</param> /// <param name="zone">Name of the zone scoping this request.</param> /// <param name="optional">Optional paramaters.</param> /// <returns>OperationListResponse</returns> public static OperationList List(replicapoolupdaterService service, string project, string zone, ZoneOperationsListOptionalParms optional = null) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (project == null) { throw new ArgumentNullException(project); } if (zone == null) { throw new ArgumentNullException(zone); } // Building the initial request. var request = service.ZoneOperations.List(project, zone); // Applying optional parameters to the request. request = (ZoneOperationsResource.ListRequest)SampleHelpers.ApplyOptionalParms(request, optional); // Requesting data. return(request.Execute()); } catch (Exception ex) { throw new Exception("Request ZoneOperations.List failed.", ex); } }
/// <summary> /// Retrieves the specified zone-specific operation resource. /// Documentation https://developers.google.com/replicapoolupdater/v1beta1/reference/zoneOperations/get /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated replicapoolupdater service.</param> /// <param name="project">Name of the project scoping this request.</param> /// <param name="zone">Name of the zone scoping this request.</param> /// <param name="operation">Name of the operation resource to return.</param> /// <returns>OperationResponse</returns> public static Operation Get(replicapoolupdaterService service, string project, string zone, string operation) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (project == null) { throw new ArgumentNullException(project); } if (zone == null) { throw new ArgumentNullException(zone); } if (operation == null) { throw new ArgumentNullException(operation); } // Make the request. return(service.ZoneOperations.Get(project, zone, operation).Execute()); } catch (Exception ex) { throw new Exception("Request ZoneOperations.Get failed.", ex); } }
/// <summary> /// Cancels an update. The update must be PAUSED before it can be cancelled. This has no effect if the update is already CANCELLED. /// Documentation https://developers.google.com/replicapoolupdater/v1beta1/reference/rollingUpdates/cancel /// Generation Note: This does not always build corectly. Google needs to standardise things I need to figuer out which ones are wrong. /// </summary> /// <param name="service">Authenticated replicapoolupdater service.</param> /// <param name="project">The Google Developers Console project name.</param> /// <param name="zone">The name of the zone in which the update's target resides.</param> /// <param name="rollingUpdate">The name of the update.</param> /// <returns>OperationResponse</returns> public static Operation Cancel(replicapoolupdaterService service, string project, string zone, string rollingUpdate) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (project == null) { throw new ArgumentNullException(project); } if (zone == null) { throw new ArgumentNullException(zone); } if (rollingUpdate == null) { throw new ArgumentNullException(rollingUpdate); } // Make the request. return(service.RollingUpdates.Cancel(project, zone, rollingUpdate).Execute()); } catch (Exception ex) { throw new Exception("Request RollingUpdates.Cancel failed.", ex); } }