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.

ArgumentRequiredDescription
usernameA user name.
client_typeFilters APIs by a client type. Possible values:
  • USER_CLIENT
  • SERVICE_ACCOUNT
  • CLIENT
allow_account_switchFilters 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.

AttributeDescription
access_levelsThe access type a user has to the API. Possible values:
  • READ-ONLY
  • READ-WRITE
api_idThe API's ID.
api_nameThe API's name.
descriptionThe human-readable details about about the API.
documentation_urlThe link to the API's documentation.
endpointSpecifies where the API can access resources.
has_accessSpecifies whether the user can access the API.
  • true. The user can access the API.
  • false. The use can't access it.
service_provider_idThe API's service provider ID.