Skip to content

Latest commit

 

History

History
327 lines (240 loc) · 7.39 KB

IamRolesApi.md

File metadata and controls

327 lines (240 loc) · 7.39 KB

Fastly::IamRolesApi

require 'fastly'
api_instance = Fastly::IamRolesApi.new

Methods

Note

All URIs are relative to https://api.fastly.com

Method HTTP request Description
add_role_permissions POST /roles/{role_id}/permissions Add permissions to a role
create_a_role POST /roles Create a role
delete_a_role DELETE /roles/{role_id} Delete a role
get_a_role GET /roles/{role_id} Get a role
list_role_permissions GET /roles/{role_id}/permissions List permissions in a role
list_roles GET /roles List roles
remove_role_permissions DELETE /roles/{role_id}/permissions Remove permissions from a role
update_a_role PATCH /roles/{role_id} Update a role

add_role_permissions()

add_role_permissions(opts): Object # Add permissions to a role

Add permissions to a role.

Examples

api_instance = Fastly::IamRolesApi.new
opts = {
    role_id: 'role_id_example', # String | Alphanumeric string identifying the role.
    request_body: { key: 3.56}, # Hash<String, Object> | 
}

begin
  # Add permissions to a role
  result = api_instance.add_role_permissions(opts)
  p result
rescue Fastly::ApiError => e
  puts "Error when calling IamRolesApi->add_role_permissions: #{e}"
end

Options

Name Type Description Notes
role_id String Alphanumeric string identifying the role.
request_body Hash<String, Object> [optional]

Return type

Object

[Back to top] [Back to API list] [Back to README]

create_a_role()

create_a_role(opts): Object # Create a role

Create a role.

Examples

api_instance = Fastly::IamRolesApi.new
opts = {
    request_body: { key: 3.56}, # Hash<String, Object> | 
}

begin
  # Create a role
  result = api_instance.create_a_role(opts)
  p result
rescue Fastly::ApiError => e
  puts "Error when calling IamRolesApi->create_a_role: #{e}"
end

Options

Name Type Description Notes
request_body Hash<String, Object> [optional]

Return type

Object

[Back to top] [Back to API list] [Back to README]

delete_a_role()

delete_a_role(opts) # Delete a role

Delete a role.

Examples

api_instance = Fastly::IamRolesApi.new
opts = {
    role_id: 'role_id_example', # String | Alphanumeric string identifying the role.
}

begin
  # Delete a role
  api_instance.delete_a_role(opts)
rescue Fastly::ApiError => e
  puts "Error when calling IamRolesApi->delete_a_role: #{e}"
end

Options

Name Type Description Notes
role_id String Alphanumeric string identifying the role.

Return type

nil (empty response body)

[Back to top] [Back to API list] [Back to README]

get_a_role()

get_a_role(opts): Object # Get a role

Get a role.

Examples

api_instance = Fastly::IamRolesApi.new
opts = {
    role_id: 'role_id_example', # String | Alphanumeric string identifying the role.
}

begin
  # Get a role
  result = api_instance.get_a_role(opts)
  p result
rescue Fastly::ApiError => e
  puts "Error when calling IamRolesApi->get_a_role: #{e}"
end

Options

Name Type Description Notes
role_id String Alphanumeric string identifying the role.

Return type

Object

[Back to top] [Back to API list] [Back to README]

list_role_permissions()

list_role_permissions(opts): Object # List permissions in a role

List all permissions in a role.

Examples

api_instance = Fastly::IamRolesApi.new
opts = {
    role_id: 'role_id_example', # String | Alphanumeric string identifying the role.
}

begin
  # List permissions in a role
  result = api_instance.list_role_permissions(opts)
  p result
rescue Fastly::ApiError => e
  puts "Error when calling IamRolesApi->list_role_permissions: #{e}"
end

Options

Name Type Description Notes
role_id String Alphanumeric string identifying the role.

Return type

Object

[Back to top] [Back to API list] [Back to README]

list_roles()

list_roles(opts): Object # List roles

List all roles.

Examples

api_instance = Fastly::IamRolesApi.new
opts = {
    per_page: 20, # Integer | Number of records per page.
    page: 1, # Integer | Current page.
}

begin
  # List roles
  result = api_instance.list_roles(opts)
  p result
rescue Fastly::ApiError => e
  puts "Error when calling IamRolesApi->list_roles: #{e}"
end

Options

Name Type Description Notes
per_page Integer Number of records per page. [optional][default to 20]
page Integer Current page. [optional]

Return type

Object

[Back to top] [Back to API list] [Back to README]

remove_role_permissions()

remove_role_permissions(opts) # Remove permissions from a role

Remove permissions from a role.

Examples

api_instance = Fastly::IamRolesApi.new
opts = {
    role_id: 'role_id_example', # String | Alphanumeric string identifying the role.
    request_body: { key: 3.56}, # Hash<String, Object> | 
}

begin
  # Remove permissions from a role
  api_instance.remove_role_permissions(opts)
rescue Fastly::ApiError => e
  puts "Error when calling IamRolesApi->remove_role_permissions: #{e}"
end

Options

Name Type Description Notes
role_id String Alphanumeric string identifying the role.
request_body Hash<String, Object> [optional]

Return type

nil (empty response body)

[Back to top] [Back to API list] [Back to README]

update_a_role()

update_a_role(opts): Object # Update a role

Update a role.

Examples

api_instance = Fastly::IamRolesApi.new
opts = {
    role_id: 'role_id_example', # String | Alphanumeric string identifying the role.
    request_body: { key: 3.56}, # Hash<String, Object> | 
}

begin
  # Update a role
  result = api_instance.update_a_role(opts)
  p result
rescue Fastly::ApiError => e
  puts "Error when calling IamRolesApi->update_a_role: #{e}"
end

Options

Name Type Description Notes
role_id String Alphanumeric string identifying the role.
request_body Hash<String, Object> [optional]

Return type

Object

[Back to top] [Back to API list] [Back to README]