Module: SAML

Included in:
DashboardAPI
Defined in:
lib/saml.rb

Overview

SAML section of the Meraki Dashboard API

Author:

  • Joe Letizia

Instance Method Summary collapse

Instance Method Details

#create_saml_role(org_id, options) ⇒ Hash

Create a new SAML role on an organization

Parameters:

  • org_id (String)

    organization ID you want to create the SAML roles on

  • options (Hash)

    an options hash containing the attributes for the SAML role. Can include role, orgAccess, tags, and networks. Refer to the Meraki Dashboard API for more information on these tags

Returns:

  • (Hash)

    returns the newly created SAML role



16
17
18
19
# File 'lib/saml.rb', line 16

def create_saml_role(org_id, options)
  
  self.make_api_call("/organizations/#{org_id}/samlRoles", 'POST', options)
end

#list_saml_roles(org_id) ⇒ Array

List all SAML roles defined on an organization

Parameters:

  • org_id (String)

    organization ID you want the SAML roles from

Returns:

  • (Array)

    an array of hashes containing each SAML role and it’s attributes



7
8
9
# File 'lib/saml.rb', line 7

def list_saml_roles(org_id)
  self.make_api_call("/organizations/#{org_id}/samlRoles", 'GET')
end

#remove_saml_role(org_id, saml_id) ⇒ Integer

Remove a single SAML role

Parameters:

  • org_id (String)

    organization ID you want to remove the SAML roles on

  • saml_id (String)

    the ID of the SAML role that you want to remove

Returns:

  • (Integer)

    HTTP Code



44
45
46
# File 'lib/saml.rb', line 44

def remove_saml_role(org_id, saml_id)
  self.make_api_call("/organizations/#{org_id}/samlRoles/#{saml_id}", 'DELETE')
end

#return_saml_role(org_id, saml_id) ⇒ Hash

Return a single SAML role

Parameters:

  • org_id (String)

    organization ID you want to return the SAML roles on

  • saml_id (String)

    the ID of the SAML role that you want to return

Returns:

  • (Hash)

    returns the request SAML role



36
37
38
# File 'lib/saml.rb', line 36

def return_saml_role(org_id, saml_id)
  self.make_api_call("/organizations/#{org_id}/samlRoles/#{saml_id}", 'GET')
end

#update_saml_role(org_id, saml_id, options) ⇒ Hahs

Update an existing SAML role on an organization

Parameters:

  • org_id (String)

    organization ID you want to update the SAML roles on

  • saml_id (String)

    the ID of the SAML role that you want to update

  • options (Hash)

    an options hash containing the attributes for the SAML role. Can include role, orgAccess, tags, and networks. Refer to the Meraki Dashboard API for more information on these tags

Returns:

  • (Hahs)

    returns the updated SAML role



27
28
29
30
# File 'lib/saml.rb', line 27

def update_saml_role(org_id, saml_id, options)
  
  self.make_api_call("/organizations/#{org_id}/samlRoles/#{saml_id}", 'PUT', options)
end