/// <summary> /// Removes the specified public key from the user. /// Documentation https://developers.google.com/clouduseraccounts/vm_beta/reference/users/removePublicKey /// 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 Clouduseraccounts service.</param> /// <param name="project">Project ID for this request.</param> /// <param name="user">Name of the user for this request.</param> /// <param name="fingerprint">The fingerprint of the public key to delete. Public keys are identified by their fingerprint, which is defined by RFC4716 to be the MD5 digest of the public key.</param> /// <returns>OperationResponse</returns> public static Operation RemovePublicKey(ClouduseraccountsService service, string project, string user, string fingerprint) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (project == null) { throw new ArgumentNullException(project); } if (user == null) { throw new ArgumentNullException(user); } if (fingerprint == null) { throw new ArgumentNullException(fingerprint); } // Make the request. return(service.Users.RemovePublicKey(project, user, fingerprint).Execute()); } catch (Exception ex) { throw new Exception("Request Users.RemovePublicKey failed.", ex); } }
/// <summary> /// Adds a public key to the specified User resource with the data included in the request. /// Documentation https://developers.google.com/clouduseraccounts/vm_beta/reference/users/addPublicKey /// 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 Clouduseraccounts service.</param> /// <param name="project">Project ID for this request.</param> /// <param name="user">Name of the user for this request.</param> /// <param name="body">A valid Clouduseraccounts vm_beta body.</param> /// <returns>OperationResponse</returns> public static Operation AddPublicKey(ClouduseraccountsService service, string project, string user, PublicKey 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 (user == null) { throw new ArgumentNullException(user); } // Make the request. return(service.Users.AddPublicKey(body, project, user).Execute()); } catch (Exception ex) { throw new Exception("Request Users.AddPublicKey failed.", ex); } }
/// <summary> /// Returns the specified User resource. /// Documentation https://developers.google.com/clouduseraccounts/vm_beta/reference/users/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 Clouduseraccounts service.</param> /// <param name="project">Project ID for this request.</param> /// <param name="user">Name of the user resource to return.</param> /// <returns>UserResponse</returns> public static User Get(ClouduseraccountsService service, string project, string user) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (project == null) { throw new ArgumentNullException(project); } if (user == null) { throw new ArgumentNullException(user); } // Make the request. return(service.Users.Get(project, user).Execute()); } catch (Exception ex) { throw new Exception("Request Users.Get failed.", ex); } }
/// <summary> /// Retrieves a list of users contained within the specified project. /// Documentation https://developers.google.com/clouduseraccounts/vm_beta/reference/users/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 Clouduseraccounts service.</param> /// <param name="project">Project ID for this request.</param> /// <param name="optional">Optional paramaters.</param> /// <returns>UserListResponse</returns> public static UserList List(ClouduseraccountsService service, string project, UsersListOptionalParms optional = null) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (project == null) { throw new ArgumentNullException(project); } // Building the initial request. var request = service.Users.List(project); // Applying optional parameters to the request. request = (UsersResource.ListRequest)SampleHelpers.ApplyOptionalParms(request, optional); // Requesting data. return(request.Execute()); } catch (Exception ex) { throw new Exception("Request Users.List failed.", ex); } }
/// <summary> /// Gets the access control policy for a resource. May be empty if no such policy or resource exists. /// Documentation https://developers.google.com/clouduseraccounts/vm_alpha/reference/users/getIamPolicy /// 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 Clouduseraccounts service.</param> /// <param name="project">Project ID for this request.</param> /// <param name="resource">Name of the resource for this request.</param> /// <returns>PolicyResponse</returns> public static Policy GetIamPolicy(ClouduseraccountsService service, string project, string resource) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (project == null) { throw new ArgumentNullException(project); } if (resource == null) { throw new ArgumentNullException(resource); } // Make the request. return(service.Users.GetIamPolicy(project, resource).Execute()); } catch (Exception ex) { throw new Exception("Request Users.GetIamPolicy failed.", ex); } }
/// <summary> /// Returns permissions that a caller has on the specified resource. /// Documentation https://developers.google.com/clouduseraccounts/vm_alpha/reference/users/testIamPermissions /// 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 Clouduseraccounts service.</param> /// <param name="project">Project ID for this request.</param> /// <param name="resource">Name of the resource for this request.</param> /// <param name="body">A valid Clouduseraccounts vm_alpha body.</param> /// <returns>TestPermissionsResponseResponse</returns> public static TestPermissionsResponse TestIamPermissions(ClouduseraccountsService service, string project, string resource, TestPermissionsRequest 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 (resource == null) { throw new ArgumentNullException(resource); } // Make the request. return(service.Users.TestIamPermissions(body, project, resource).Execute()); } catch (Exception ex) { throw new Exception("Request Users.TestIamPermissions failed.", ex); } }
/// <summary> /// Retrieves the specified operation resource. /// Documentation https://developers.google.com/clouduseraccounts/vm_alpha/reference/globalAccountsOperations/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 Clouduseraccounts service.</param> /// <param name="project">Project ID for this request.</param> /// <param name="operation">Name of the Operations resource to return.</param> /// <returns>OperationResponse</returns> public static Operation Get(ClouduseraccountsService service, string project, string operation) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (project == null) { throw new ArgumentNullException(project); } if (operation == null) { throw new ArgumentNullException(operation); } // Make the request. return(service.GlobalAccountsOperations.Get(project, operation).Execute()); } catch (Exception ex) { throw new Exception("Request GlobalAccountsOperations.Get failed.", ex); } }
/// <summary> /// Adds users to the specified group. /// Documentation https://developers.google.com/clouduseraccounts/beta/reference/groups/addMember /// 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 Clouduseraccounts service.</param> /// <param name="project">Project ID for this request.</param> /// <param name="groupName">Name of the group for this request.</param> /// <param name="body">A valid Clouduseraccounts beta body.</param> /// <returns>OperationResponse</returns> public static Operation AddMember(ClouduseraccountsService service, string project, string groupName, GroupsAddMemberRequest 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 (groupName == null) { throw new ArgumentNullException(groupName); } // Make the request. return(service.Groups.AddMember(body, project, groupName).Execute()); } catch (Exception ex) { throw new Exception("Request Groups.AddMember failed.", ex); } }
/// <summary> /// Creates a Group resource in the specified project using the data included in the request. /// Documentation https://developers.google.com/clouduseraccounts/beta/reference/groups/insert /// 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 Clouduseraccounts service.</param> /// <param name="project">Project ID for this request.</param> /// <param name="body">A valid Clouduseraccounts beta body.</param> /// <returns>OperationResponse</returns> public static Operation Insert(ClouduseraccountsService service, string project, Group 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); } // Make the request. return(service.Groups.Insert(body, project).Execute()); } catch (Exception ex) { throw new Exception("Request Groups.Insert failed.", ex); } }
/// <summary> /// Returns the specified Group resource. /// Documentation https://developers.google.com/clouduseraccounts/beta/reference/groups/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 Clouduseraccounts service.</param> /// <param name="project">Project ID for this request.</param> /// <param name="groupName">Name of the Group resource to return.</param> /// <returns>GroupResponse</returns> public static Group Get(ClouduseraccountsService service, string project, string groupName) { try { // Initial validation. if (service == null) { throw new ArgumentNullException("service"); } if (project == null) { throw new ArgumentNullException(project); } if (groupName == null) { throw new ArgumentNullException(groupName); } // Make the request. return(service.Groups.Get(project, groupName).Execute()); } catch (Exception ex) { throw new Exception("Request Groups.Get failed.", ex); } }
/// <summary> /// Returns a list of authorized public keys for a specific user account. /// Documentation https://developers.google.com/clouduseraccounts/alpha/reference/linux/getAuthorizedKeysView /// 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 Clouduseraccounts service.</param> /// <param name="project">Project ID for this request.</param> /// <param name="zone">Name of the zone for this request.</param> /// <param name="user">The user account for which you want to get a list of authorized public keys.</param> /// <param name="instance">The fully-qualified URL of the virtual machine requesting the view.</param> /// <param name="optional">Optional paramaters.</param> /// <returns>LinuxGetAuthorizedKeysViewResponseResponse</returns> public static LinuxGetAuthorizedKeysViewResponse GetAuthorizedKeysView(ClouduseraccountsService service, string project, string zone, string user, string instance, LinuxGetAuthorizedKeysViewOptionalParms 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); } if (user == null) { throw new ArgumentNullException(user); } if (instance == null) { throw new ArgumentNullException(instance); } // Building the initial request. var request = service.Linux.GetAuthorizedKeysView(project, zone, user, instance); // Applying optional parameters to the request. request = (LinuxResource.GetAuthorizedKeysViewRequest)SampleHelpers.ApplyOptionalParms(request, optional); // Requesting data. return(request.Execute()); } catch (Exception ex) { throw new Exception("Request Linux.GetAuthorizedKeysView failed.", ex); } }