fastly · Capability

Fastly Account API — IAM Roles

Fastly Account API — IAM Roles. 2 operations. Lead operation: List IAM roles. Self-contained Naftiko capability covering one Fastly business surface.

Run with Naftiko FastlyIAM Roles

What You Can Do

GET
Listroles — List IAM roles
/v1/roles
GET
Getrole — Get an IAM role
/v1/roles/{role-id}

MCP Tools

list-iam-roles

List IAM roles

read-only idempotent
get-iam-role

Get an IAM role

read-only idempotent

Capability Spec

account-iam-roles.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Fastly Account API — IAM Roles
  description: 'Fastly Account API — IAM Roles. 2 operations. Lead operation: List IAM roles. Self-contained Naftiko capability
    covering one Fastly business surface.'
  tags:
  - Fastly
  - IAM Roles
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    FASTLY_API_KEY: FASTLY_API_KEY
capability:
  consumes:
  - type: http
    namespace: account-iam-roles
    baseUri: https://api.fastly.com
    description: Fastly Account API — IAM Roles business capability. Self-contained, no shared references.
    resources:
    - name: roles
      path: /roles
      operations:
      - name: listroles
        method: GET
        description: List IAM roles
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: per_page
          in: query
          type: integer
          description: The number of items per page.
        - name: cursor
          in: query
          type: string
          description: The cursor for pagination.
    - name: roles-role_id
      path: /roles/{role_id}
      operations:
      - name: getrole
        method: GET
        description: Get an IAM role
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: role_id
          in: path
          type: string
          description: The alphanumeric string identifying the IAM role.
          required: true
    authentication:
      type: apikey
      key: Fastly-Key
      value: '{{env.FASTLY_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: account-iam-roles-rest
    port: 8080
    description: REST adapter for Fastly Account API — IAM Roles. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/roles
      name: roles
      description: REST surface for roles.
      operations:
      - method: GET
        name: listroles
        description: List IAM roles
        call: account-iam-roles.listroles
        with:
          per_page: rest.per_page
          cursor: rest.cursor
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/roles/{role-id}
      name: roles-role-id
      description: REST surface for roles-role_id.
      operations:
      - method: GET
        name: getrole
        description: Get an IAM role
        call: account-iam-roles.getrole
        with:
          role_id: rest.role_id
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: account-iam-roles-mcp
    port: 9090
    transport: http
    description: MCP adapter for Fastly Account API — IAM Roles. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: list-iam-roles
      description: List IAM roles
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: account-iam-roles.listroles
      with:
        per_page: tools.per_page
        cursor: tools.cursor
      outputParameters:
      - type: object
        mapping: $.
    - name: get-iam-role
      description: Get an IAM role
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: account-iam-roles.getrole
      with:
        role_id: tools.role_id
      outputParameters:
      - type: object
        mapping: $.