Allowed APIs
akamai_iam_allowed_apis
Get a list of available APIs to a given user.
data "akamai_iam_allowed_apis" "my_apis" {
username = "jsmith"
client_type = "SERVICE_ACCOUNT"
allow_account_switch = "true"
}
output "my_apis" {
value = data.akamai_iam_allowed_apis.my_apis
}
my_apis = {
allowed_apis = [
{
access_levels = [
"READ-ONLY",
]
api_id = 123
api_name = "Event Viewer APIs"
description = "Event Viewer APIs"
documentation_url = "https://developer.akamai.com/api/core_features/event_viewer/v1.html"
endpoint = "/event-viewer-api/v1/"
has_access = true
service_provider_id = 1
},
{
access_levels = [
"READ-WRITE",
"READ-ONLY",
]
api_id = 987
api_name = "EdgeWorkers"
description = "EdgeWorkers"
documentation_url = "https://developer.akamai.com/api/web_performance/edgeworkers/v1.html"
endpoint = "/edgeworkers/"
has_access = true
service_provider_id = 1
},
]
client_type = "SERVICE_ACCOUNT"
username = "jsmith"
}
Arguments
Pass the name of a user in the data
block to get a list of APIs available to them. Optionally, you can narrow down the results by a client type or account switch key.
Argument | Required | Description |
---|---|---|
username | ✔ | A user name. |
client_type | Filters APIs by a client type. Possible values:
| |
allow_account_switch | Filters APIs by accounts the user can switch to. It's false by default. |
Attributes
Returned to you is an allowed_apis
list for the specified user.
Attribute | Description |
---|---|
access_levels | The access type a user has to the API. Possible values:
|
api_id | The API's ID. |
api_name | The API's name. |
description | The human-readable details about about the API. |
documentation_url | The link to the API's documentation. |
endpoint | Specifies where the API can access resources. |
has_access | Specifies whether the user can access the API.
|
service_provider_id | The API's service provider ID. |
Updated 3 days ago