require 'fastly'
api_instance = Fastly::IamRolesApi.newNote
All URIs are relative to https://api.fastly.com
| Method | HTTP request | Description |
|---|---|---|
| iam_v1_roles_get | GET /iam/v1/roles/{role_id} | Get IAM role by ID |
| iam_v1_roles_list | GET /iam/v1/roles | List IAM roles |
iam_v1_roles_get(opts): <IamV1RoleResponse> # Get IAM role by IDRetrieve a single IAM role by its unique identifier.
api_instance = Fastly::IamRolesApi.new
opts = {
role_id: 'Q4rXe9vN1szK8a2fUjYtWp', # String | Alphanumeric string identifying the role.
include: 'permissions', # String | Include related data (i.e., permissions).
}
begin
# Get IAM role by ID
result = api_instance.iam_v1_roles_get(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling IamRolesApi->iam_v1_roles_get: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| role_id | String | Alphanumeric string identifying the role. | |
| include | String | Include related data (i.e., permissions). | [optional] |
[Back to top] [Back to API list] [Back to README]
iam_v1_roles_list(opts): <IamV1RoleListResponse> # List IAM rolesRetrieve a paginated list of IAM roles available in the account.
api_instance = Fastly::IamRolesApi.new
opts = {
limit: 56, # Integer | Number of results per page. The maximum is 1000.
cursor: 'cursor_example', # String | Cursor value from the `next_cursor` field of a previous response, used to retrieve the next page. To request the first page, this should be empty.
}
begin
# List IAM roles
result = api_instance.iam_v1_roles_list(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling IamRolesApi->iam_v1_roles_list: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| limit | Integer | Number of results per page. The maximum is 1000. | [optional][default to 100] |
| cursor | String | Cursor value from the next_cursor field of a previous response, used to retrieve the next page. To request the first page, this should be empty. |
[optional] |