class TerraformEnterprise::API::Workspaces
Workspace resource request
Public Instance Methods
action(params = {})
click to toggle source
# File lib/terraform_enterprise/api/resource_requests/workspaces.rb, line 45 def action(params = {}) id = params[:id] action = params[:action].to_sym @request.post(:workspaces, id, :actions, action) end
create(params = {})
click to toggle source
# File lib/terraform_enterprise/api/resource_requests/workspaces.rb, line 17 def create(params = {}) org = params.delete(:organization) data = { attributes: params, type: 'workspaces' } @request.post(:organizations, org, :workspaces, data: data) end
delete(params = {})
click to toggle source
# File lib/terraform_enterprise/api/resource_requests/workspaces.rb, line 39 def delete(params = {}) organization = params[:organization] workspace = params[:workspace] @request.delete(:organizations, organization, :workspaces, workspace) end
get(params = {})
click to toggle source
# File lib/terraform_enterprise/api/resource_requests/workspaces.rb, line 11 def get(params = {}) organization = params[:organization] workspace = params[:workspace] @request.get(:organizations, organization, :workspaces, workspace) end
list(params = {})
click to toggle source
# File lib/terraform_enterprise/api/resource_requests/workspaces.rb, line 7 def list(params = {}) @request.get(:organizations, params[:organization], :workspaces) end
update(params = {})
click to toggle source
# File lib/terraform_enterprise/api/resource_requests/workspaces.rb, line 27 def update(params = {}) org = params.delete(:organization) id = params.delete(:workspace) data = { attributes: params, type: 'workspaces' } @request.patch(:organizations, org, :workspaces, id, data: data) end