/// <summary>Snippet for SetBackendService</summary> public void SetBackendService() { // Snippet: SetBackendService(string, string, TargetSslProxiesSetBackendServiceRequest, CallSettings) // Create client TargetSslProxiesClient targetSslProxiesClient = TargetSslProxiesClient.Create(); // Initialize request argument(s) string project = ""; string targetSslProxy = ""; TargetSslProxiesSetBackendServiceRequest targetSslProxiesSetBackendServiceRequestResource = new TargetSslProxiesSetBackendServiceRequest(); // Make the request Operation response = targetSslProxiesClient.SetBackendService(project, targetSslProxy, targetSslProxiesSetBackendServiceRequestResource); // End snippet }
/// <summary>Snippet for SetBackendServiceAsync</summary> public async Task SetBackendServiceAsync() { // Snippet: SetBackendServiceAsync(string, string, TargetSslProxiesSetBackendServiceRequest, CallSettings) // Additional: SetBackendServiceAsync(string, string, TargetSslProxiesSetBackendServiceRequest, CancellationToken) // Create client TargetSslProxiesClient targetSslProxiesClient = await TargetSslProxiesClient.CreateAsync(); // Initialize request argument(s) string project = ""; string targetSslProxy = ""; TargetSslProxiesSetBackendServiceRequest targetSslProxiesSetBackendServiceRequestResource = new TargetSslProxiesSetBackendServiceRequest(); // Make the request Operation response = await targetSslProxiesClient.SetBackendServiceAsync(project, targetSslProxy, targetSslProxiesSetBackendServiceRequestResource); // End snippet }
/// <summary> /// Changes the BackendService for TargetSslProxy. /// Documentation https://developers.google.com/compute/v1/reference/targetSslProxies/setBackendService /// 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 Compute service.</param> /// <param name="project">Project ID for this request.</param> /// <param name="targetSslProxy">Name of the TargetSslProxy resource whose BackendService resource is to be set.</param> /// <param name="body">A valid Compute v1 body.</param> /// <param name="optional">Optional paramaters.</param> /// <returns>OperationResponse</returns> public static Operation SetBackendService(ComputeService service, string project, string targetSslProxy, TargetSslProxiesSetBackendServiceRequest body, TargetSslProxiesSetBackendServiceOptionalParms optional = null) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (body == null) { throw new ArgumentNullException("body"); } if (project == null) { throw new ArgumentNullException(project); } if (targetSslProxy == null) { throw new ArgumentNullException(targetSslProxy); } // Building the initial request. var request = service.TargetSslProxies.SetBackendService(body, project, targetSslProxy); // Applying optional parameters to the request. request = (TargetSslProxiesResource.SetBackendServiceRequest)SampleHelpers.ApplyOptionalParms(request, optional); // Requesting data. return(request.Execute()); } catch (Exception ex) { throw new Exception("Request TargetSslProxies.SetBackendService failed.", ex); } }
/// <summary> /// Changes the BackendService for TargetSslProxy. /// Documentation https://developers.google.com/compute/alpha/reference/targetSslProxies/setBackendService /// 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 compute service.</param> /// <param name="project">Project ID for this request.</param> /// <param name="targetSslProxy">Name of the TargetSslProxy resource whose BackendService resource is to be set.</param> /// <param name="body">A valid compute alpha body.</param> /// <returns>OperationResponse</returns> public static Operation SetBackendService(computeService service, string project, string targetSslProxy, TargetSslProxiesSetBackendServiceRequest body) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (body == null) { throw new ArgumentNullException("body"); } if (project == null) { throw new ArgumentNullException(project); } if (targetSslProxy == null) { throw new ArgumentNullException(targetSslProxy); } // Make the request. return(service.TargetSslProxies.SetBackendService(body, project, targetSslProxy).Execute()); } catch (Exception ex) { throw new Exception("Request TargetSslProxies.SetBackendService failed.", ex); } }