components:
  parameters: {}
  schemas:
    AWSEventBridgeIntegration:
      properties:
        attributes:
          properties:
            aws-account-id:
              description: The AWS account ID, 12 digits.
              maxLength: 12
              minLength: 12
              type: string
            err-message:
              description: Message from service that points to nature of a problem
              nullable: true
              readOnly: true
              type: string
            event-source:
              description: The name of the partner event source.
              readOnly: true
              type: string
            event-source-arn:
              description: The ARN of the partner event source.
              readOnly: true
              type: string
            name:
              description: Connection name
              maxLength: 128
              minLength: 1
              type: string
            region:
              description: The AWS region name.
              maxLength: 50
              minLength: 1
              type: string
            status:
              description: Status of integration.
              enum:
              - active
              - disabled
              - failed
              - pending
              type: string
          required:
          - name
          - aws-account-id
          - region
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            account:
              description: The account this integration belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - accounts
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - aws-event-bridge-integrations
          type: string
      required:
      - type
      - attributes
      type: object
    AWSEventBridgeIntegrationDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/AWSEventBridgeIntegration'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    AWSEventBridgeIntegrationListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/AWSEventBridgeIntegration'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    AccessPolicy:
      description: |-
        Grants the permissions declared in a role to a user, team, or service account.

        An access policy is applied to an environment or a specific workspace.
      properties:
        attributes:
          properties:
            is-system:
              description: The access policy is a built-in read-only policy that cannot be updated or deleted.
              readOnly: true
              type: boolean
          type: object
        id:
          readOnly: true
          type: string
        links:
          additionalProperties:
            type: string
          type: object
        relationships:
          properties:
            account:
              description: Grant access to the account and to all environments and workspaces in the account.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - accounts
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            environment:
              description: Grant access to the environment and all workspaces within it.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - environments
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            roles:
              description: The roles with permissions.
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - roles
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  type: array
              required:
              - data
              type: object
            service-account:
              description: Role binding to a service account.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - service-accounts
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            team:
              description: Role binding to a team.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - teams
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            user:
              description: Role binding to a user.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - users
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            workspace:
              description: Grant access to the workspace.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - workspaces
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
          required:
          - roles
          type: object
        type:
          enum:
          - access-policies
          type: string
      required:
      - type
      - relationships
      type: object
    AccessPolicyDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/AccessPolicy'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    AccessPolicyListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/AccessPolicy'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    AccessToken:
      description: Access Token for the Scalr API.
      properties:
        attributes:
          properties:
            created-at:
              description: Date/Time the token was created.
              format: date-time
              readOnly: true
              type: string
            description:
              description: The description of the token.
              maxLength: 255
              nullable: true
              type: string
            expires-at:
              description: Date/Time when the token is set to expire.
              format: date-time
              nullable: true
              readOnly: true
              type: string
            expires-in:
              description: The number of minutes until the token expires.
              nullable: true
              type: integer
            is-expired:
              default: false
              description: Whether the token is expired.
              readOnly: true
              type: boolean
            last-used-at:
              description: Date/Time when the token was last used.
              format: date-time
              nullable: true
              readOnly: true
              type: string
            name:
              description: The name of the token.
              maxLength: 64
              nullable: true
              type: string
            token:
              description: |-
                The JWT token which an API client should pass in the `Authorization: Bearer <token>`
                header. Available only in the [Create an Access Token](#create-an-access-token) response.
              nullable: true
              readOnly: true
              type: string
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            created-by:
              description: The user who created the token.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - users
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - access-tokens
          type: string
      required:
      - type
      type: object
    AccessTokenDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/AccessToken'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    AccessTokenListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/AccessToken'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    AccessTokenUsage:
      description: Represents the access token item.
      properties:
        attributes:
          properties:
            created-at:
              description: The time when the token was created.
              format: date-time
              type: string
            description:
              description: The description of the token.
              maxLength: 255
              nullable: true
              type: string
            expires-at:
              description: The UTC expiration datetime.
              format: date-time
              nullable: true
              type: string
            last-characters:
              description: The last 6 characters of the token
              maxLength: 512
              type: string
            last-used-at:
              description: The time when the token was last used.
              format: date-time
              nullable: true
              type: string
            name:
              description: The name of the token.
              maxLength: 64
              nullable: true
              type: string
            owner-email:
              type: string
            owner-status:
              enum:
              - Active
              - Inactive
              - Pending
              type: string
            owner-type:
              enum:
              - user
              - service-account
              type: string
          type: object
        id:
          readOnly: true
          type: string
        links:
          additionalProperties:
            type: string
          type: object
        type:
          enum:
          - access-token-usages
          type: string
      required:
      - type
      type: object
    AccessTokenUsageListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/AccessTokenUsage'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    Account:
      description: API Resource for the account.
      properties:
        attributes:
          properties:
            allowed-ips:
              description: The list of allowed IP networks for IP fencing
              items:
                format: ipv4network
                type: string
              type: array
            created-at:
              format: date-time
              readOnly: true
              type: string
            last-login-attempt-at:
              deprecated: true
              format: date-time
              nullable: true
              readOnly: true
              type: string
            login-attempts:
              deprecated: true
              nullable: true
              readOnly: true
              type: integer
            name:
              description: The name of the account
              maxLength: 255
              type: string
            quotas:
              description: The list of account's quotas
              properties:
                agent-relay-available:
                  description: Indicates if the agent relay is available for an account
                  type: boolean
                agents:
                  description: The maximal number of agents
                  type: integer
                before-after-hooks-available:
                  description: Indicates if the before-after hooks are available for an account
                  type: boolean
                environments:
                  description: The maximal number of environments
                  type: integer
                max-concurrent-runs:
                  description: The maximal number of concurrent runs
                  type: integer
                policy-group-checks-available:
                  description: Indicates if the policy group checks are available for an account
                  type: boolean
                policy-groups:
                  description: The maximal number of policy groups
                  type: integer
                registry-modules:
                  description: The maximal number of registry modules
                  type: integer
                registry-templates:
                  description: The maximal number of registry templates
                  type: integer
                run-triggers:
                  description: The maximal number of run triggers
                  type: integer
                service-accounts-available:
                  description: Indicates if the service accounts are available for an account
                  type: boolean
                sso-available:
                  description: Indicates if the SSO is available for an account
                  type: boolean
                users:
                  description: The maximal number of users
                  type: integer
                vcs-providers:
                  description: The maximal number of VCS providers
                  type: integer
                workspaces:
                  description: The maximal number of workspaces
                  type: integer
              type: object
            support-access-enabled:
              default: true
              description: If enabled, Scalr support staff will be able to access the account for troubleshooting purposes.
              type: boolean
          required:
          - name
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            billing-plan:
              description: The billing plan of this account
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - billing-plans
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            identity-provider:
              description: The identity provider of this account
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - identity-providers
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            owner:
              description: The user that owns this account
              properties:
                data:
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - users
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
          required:
          - owner
          type: object
        type:
          enum:
          - accounts
          type: string
      required:
      - type
      - attributes
      - relationships
      type: object
    AccountDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/Account'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    AccountListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/Account'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    AccountMetrics:
      description: Represents account metrics.
      properties:
        billings-flex-runs-count:
          type: integer
        billings-run-minutes-count:
          type: integer
        billings-runs-count:
          type: integer
        environments-count:
          type: integer
        quota-max-concurrency:
          type: integer
        runs-awaiting-confirmation:
          type: integer
        runs-concurrency:
          type: integer
        runs-count:
          type: integer
        runs-failed:
          type: integer
        runs-queue-size:
          type: integer
        runs-successful:
          type: integer
        workspaces-count:
          type: integer
      required:
      - workspaces-count
      - runs-count
      - environments-count
      - runs-awaiting-confirmation
      - runs-failed
      - runs-successful
      - runs-concurrency
      type: object
    AccountUser:
      description: Represents an account-user relation.
      properties:
        attributes:
          properties:
            last-login-at:
              description: The UTC timestamp when the user logged in to the account.
              format: date-time
              nullable: true
              type: string
            status:
              description: 'The relation status. Can be: `Active`, `Inactive`, `Pending`.'
              enum:
              - Active
              - Inactive
              - Pending
              type: string
          type: object
        id:
          readOnly: true
          type: string
        links:
          additionalProperties:
            type: string
          type: object
        relationships:
          properties:
            account:
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - accounts
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            teams:
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - teams
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              required:
              - data
              type: object
            user:
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - users
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - account-users
          type: string
      required:
      - type
      type: object
    AccountUserDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/AccountUser'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    AccountUserListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/AccountUser'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    Agent:
      description: |-
        An agent represents a single instance of self-hosted runner installed on a customer's on-prem
        infrastructure.

        An agent resource is automatically created when [self-hosted runner](../../agent_pools.html)
        connects to the API server to join it [agent pool](agent-pools.html). In order to connect to the
        pool, the runner requires an [agent pool token](access-tokens.html#create-an-agent-pool-access-token).
      properties:
        attributes:
          properties:
            cpu-platform:
              default: linux_amd64
              description: The agent's CPU platform. The default value is `linux_amd64`.
              enum:
              - linux_amd64
              - linux_arm64
              type: string
            created-at:
              description: The resource creation timestamp.
              format: date-time
              readOnly: true
              type: string
            driver:
              description: 'The agent''s driver: docker, kubernetes or local.'
              enum:
              - unknown
              - local
              - docker
              - kubernetes
              - kubernetes-job
              type: string
            error-message:
              description: Contains the error message if the agent is in an `errored` status.
              nullable: true
              readOnly: true
              type: string
            kubernetes-driver-mode:
              description: The Kubernetes driver mode (default, controller, or worker). Defines the agent's role within the
                Kubernetes execution model.
              enum:
              - default
              - controller
              - worker
              type: string
            last-seen-at:
              description: The timestamp when the agent was last seen online.
              format: date-time
              readOnly: true
              type: string
            name:
              description: The name of the agent. This must be unique within the agent pool.
              maxLength: 64
              type: string
            os:
              description: 'The agent''s OS distribution name and version (ex: `centos_8`, `ubuntu_20`)'
              maxLength: 64
              type: string
            relay-last-seen-at:
              description: The UTC datetime of the last relay connect from the Agent.
              format: date-time
              nullable: true
              readOnly: true
              type: string
            runtime:
              description: The agent's runtime (docker, kubernetes, vm, fatgate, etc)
              enum:
              - unknown
              - docker
              - kubernetes
              - vm
              - fargate
              type: string
            status:
              description: |-
                The agent's current status

                * `busy` - The agent is working on a task.
                * `errored` - The agent has an error and can't operate correctly.
                The attribute `error-message` has the details.
                * `idle` - The agent is idle and ready to start working on a task.
                * `offline` - API server hasn't seen the agent's heartbeat for 30 seconds.
              enum:
              - idle
              - busy
              - offline
              - errored
              readOnly: true
              type: string
            upgrade-status:
              description: Agent version upgrade status indicating how current the agent version is and what level of upgrade
                attention is required. Used to display appropriate warnings and encourage timely upgrades.
              enum:
              - none
              - low
              - medium
              - high
              readOnly: true
              type: string
            version:
              description: The agent's version.
              maxLength: 64
              type: string
          required:
          - name
          - os
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            pool:
              description: The agent pool this agent is a member of.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - agent-pools
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - agents
          type: string
      required:
      - type
      - attributes
      type: object
    AgentDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/Agent'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    AgentListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/Agent'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    AgentPool:
      description: |-
        With the agent pool resource you can manage a pool of [self-hosted agents](/docs/agent-pools)

        A workspace may be configured to use an agent pool to execute terraform [runs](/docs/workspaces-runs).
        Agents could be hosted on a physical or virtual machines within the customer's network.
      properties:
        attributes:
          properties:
            default:
              default: false
              description: Default agent pool for the entire account. Used by a workspace if no default pool is set at the
                environment level and no other pool is explicitly linked at the workspace level.
              type: boolean
            features:
              description: The features enabled for all agents in the agent pool.
              items:
                enum:
                - relay
                type: string
              readOnly: true
              type: array
            in-use:
              default: false
              description: Indicates whether the pool is used by any workspace.
              readOnly: true
              type: boolean
            is-scalr-managed:
              default: false
              description: Indicates whether the pool is managed by Scalr.
              readOnly: true
              type: boolean
            is-shared:
              default: true
              description: Indicates whether the pool is available in any environment of the account without being directly
                linked to it.
              type: boolean
            name:
              description: |-
                The name of the agent pool. This must be unique within a Scalr scope
                (e.g. account or environment).
              maxLength: 64
              type: string
            vcs-enabled:
              default: false
              description: Indicates whether the VCS support is enabled for agents in the pool.
              type: boolean
            webhook-enabled:
              default: false
              description: Indicates whether the serverless agent support is enabled. If enabled, provided url will be informed
                about new work available for agent.
              type: boolean
            webhook-headers:
              description: A list of HTTP headers to be included in the request.
              items:
                properties:
                  name:
                    description: A header name.
                    type: string
                  sensitive:
                    default: false
                    description: Whether the value is a sensitive.
                    type: boolean
                  value:
                    description: A header value. Not visible if sensitive.
                    nullable: true
                    type: string
                required:
                - name
                - value
                type: object
              nullable: true
              type: array
            webhook-url:
              description: HTTP(s) destination URL.
              nullable: true
              type: string
          required:
          - name
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            account:
              description: The account the agent pool belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - accounts
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            agents:
              description: The list of agents connected to the pool.
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - agents
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              readOnly: true
              required:
              - data
              type: object
            default-environments:
              description: The list of environments this pool is directly linked as default agent pool.
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - environments
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              readOnly: true
              required:
              - data
              type: object
            environment:
              deprecated: true
              description: The environment the agent pool belongs to. This relationship is deprecated.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - environments
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            environments:
              description: The list of environments this pool is directly linked to.
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - environments
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              required:
              - data
              type: object
            workspaces:
              description: The list of workspaces attached to the pool. Can be used to bulk link/unlink workspaces.
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - workspaces
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - agent-pools
          type: string
      required:
      - type
      - attributes
      type: object
    AgentPoolDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/AgentPool'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    AgentPoolListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/AgentPool'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    AiUsage:
      description: Represents the AI usage item.
      properties:
        attributes:
          properties:
            model:
              default: claude
              description: The AI model name used to process the request.
              enum:
              - claude
              type: string
            request-type:
              default: explain
              description: The type of the AI action request.
              enum:
              - explain
              - summarize
              type: string
            requested-at:
              description: The time when the AI action was requested.
              format: date-time
              type: string
            requested-by-email:
              description: The email of the user who requested the AI action.
              maxLength: 255
              nullable: true
              type: string
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            input:
              description: Link to download the run data sent to the AI.
              nullable: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            account:
              description: The account this resource belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - accounts
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            run:
              description: The run for which the AI action was requested.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - runs
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - ai-usages
          type: string
      required:
      - type
      type: object
    AiUsageDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/AiUsage'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    AiUsageListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/AiUsage'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    Apply:
      description: |-
        Applies are the details of a request to apply a Terraform plan.

        An apply may or may not be successful as indicated by the `status` attribute.
      properties:
        attributes:
          properties:
            execution-details:
              additionalProperties:
                type: string
              description: Apply execution details.
              type: object
            resource-additions:
              description: The number of resources added.
              nullable: true
              type: integer
            resource-changes:
              description: The number of resources updated.
              nullable: true
              type: integer
            resource-destructions:
              description: The number of resources destroyed.
              nullable: true
              type: integer
            status:
              description: |-
                The Apply's current status.

                Transient states:
                * `pending` - Apply has been created but not yet `queued`.
                * `queued` - Queued and waiting for capacity/and or quota to be available.
                * `running` - Running.

                Final states:
                * `canceled` - Apply canceled in some way.
                * `errored` - An error occurred during the apply. See `output` for details.
                * `finished` - Apply completed successfully.
                * `unreachable` - Apply will not be run.
              enum:
              - pending
              - queued
              - running
              - finished
              - canceled
              - errored
              - unreachable
              type: string
            status-timestamps:
              additionalProperties:
                format: date-time
                type: string
              description: Date/Time of transition to each status that has occurred.
              type: object
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            output:
              description: URL to download the apply output.
              nullable: true
              type: string
            self:
              type: string
          readOnly: true
          type: object
        type:
          enum:
          - applies
          type: string
      required:
      - type
      type: object
    ApplyDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/Apply'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    AssumeServiceAccountPolicy:
      description: A trust configuration that maps authenticated workload identities to specific service account.
      properties:
        attributes:
          properties:
            claim-conditions:
              description: A claim mapping, defining the conditions under which the workload identity can impersonate the
                service account..
              items:
                properties:
                  claim:
                    description: The name of the claim in the OIDC ID token that needs to be evaluated.
                    type: string
                  operator:
                    default: eq
                    description: 'The operation to perform to evaluate the claim''s value against the specified condition.
                      Supported values: "eq": checks if the claim value is equal to the specified value; "contains": checks
                      if the claim value contains the specified value as a substring; "startswith": checks if the claim value
                      starts with the specified value; "endswith": checks if the claim value ends with the specified value;
                      "like": checks whether the claim value matches a specified pattern using shell-style wildcards (* any
                      string, ? any char, [seq] any in seq, [!seq] any not in seq).'
                    enum:
                    - eq
                    - contains
                    - startswith
                    - endswith
                    - like
                    type: string
                  value:
                    description: The expected value or pattern to match for the specified claim.
                    type: string
                required:
                - claim
                - value
                type: object
              type: array
            created-at:
              description: The UTC datetime at which the assume service account policy was created.
              format: date-time
              readOnly: true
              type: string
            created-by-email:
              description: Email of the user who created assume service account policy.
              nullable: true
              readOnly: true
              type: string
            maximum-session-duration:
              default: 3600
              description: 'The maximum validity period, in seconds, for the token generated during the impersonation operation.
                Default: 3600 seconds or 1 hour. Range: 3600-43200 seconds (1-12 hours).'
              nullable: true
              type: integer
            name:
              description: The assume service account policy name.
              maxLength: 255
              type: string
          required:
          - name
          - claim-conditions
          type: object
        id:
          readOnly: true
          type: string
        links:
          additionalProperties:
            type: string
          type: object
        relationships:
          properties:
            provider:
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - workload-identity-providers
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            service-account:
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - service-accounts
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - assume-service-account-policies
          type: string
      required:
      - type
      - attributes
      type: object
    AssumeServiceAccountPolicyDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/AssumeServiceAccountPolicy'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    AssumeServiceAccountPolicyListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/AssumeServiceAccountPolicy'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    AssumeServiceAccountRequest:
      description: An assume service account request.
      properties:
        id-token:
          type: string
        lifetime:
          type: integer
        service-account-email:
          type: string
      required:
      - service-account-email
      - id-token
      type: object
    BillingPlan:
      properties:
        attributes:
          properties:
            amount:
              type: integer
            included-runs:
              nullable: true
              type: integer
            plan-type:
              enum:
              - monthly
              - yearly
              - deprecated-yearly
              type: string
            prices:
              items:
                properties:
                  amount:
                    nullable: true
                    type: integer
                  currency:
                    type: string
                  interval:
                    type: string
                  type:
                    enum:
                    - membership
                    - pre-paid-runs
                    - flex-runs
                    - flex-runs-minutes
                    type: string
                  unit-label:
                    nullable: true
                    type: string
                required:
                - currency
                - type
                - interval
                type: object
              type: array
          type: object
        id:
          readOnly: true
          type: string
        links:
          additionalProperties:
            type: string
          type: object
        relationships:
          properties:
            tier:
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - billing-tiers
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - billing-plans
          type: string
      required:
      - type
      type: object
    BillingPlanDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/BillingPlan'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    BillingUsage:
      description: Represents billing usage data for runs by time periods.
      properties:
        attributes:
          properties:
            account-id:
              description: The ID of the account.
              nullable: true
              type: string
            account-name:
              description: The name of the account.
              nullable: true
              type: string
            environment-id:
              description: The environment ID.
              nullable: true
              type: string
            environment-name:
              description: The environment name.
              nullable: true
              type: string
            plan-apply-runs:
              default: 0
              description: The number of plan & apply runs.
              type: integer
            plan-only-runs:
              default: 0
              description: The number of plan-only runs.
              type: integer
            total-runs:
              default: 0
              description: The total number of runs.
              type: integer
            workspace-id:
              description: The workspace ID.
              nullable: true
              type: string
            workspace-name:
              description: The workspace name.
              nullable: true
              type: string
          type: object
        id:
          readOnly: true
          type: string
        links:
          additionalProperties:
            type: string
          type: object
        type:
          enum:
          - billing-usages
          type: string
      required:
      - type
      type: object
    BillingUsageListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/BillingUsage'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    BuiltInProviderTypes:
      enum:
      - aws
      - azurerm
      - google
      - scalr
      type: string
    CheckovIntegration:
      properties:
        attributes:
          properties:
            cli-args:
              description: CLI parameters to be passed to checkov command.
              nullable: true
              type: string
            err-message:
              description: Message from service that points to nature of a problem.
              nullable: true
              readOnly: true
              type: string
            external-checks-enabled:
              description: Indicates whether external checks should be enabled.
              type: boolean
            is-shared:
              description: Indicates whether the integration is available in any existing or future  environments of the account
                without directly linking it.
              type: boolean
            name:
              description: Name of the Checkov integration.
              maxLength: 128
              type: string
            status:
              description: Status of the integration.
              enum:
              - active
              - disabled
              - failed
              - pending
              type: string
            vcs-repo:
              nullable: true
              properties:
                branch:
                  description: Branch of a repository the Checkov custom checks are associated with.
                  type: string
                identifier:
                  description: |-
                    A reference to your VCS repository.

                    For GitHub, GitHub Enterprise and GitLab the format is `<org>/<repo>`.
                    For Azure DevOps Services the format is `<org>/<project>/<repo>`.
                  type: string
                path:
                  default: ''
                  description: |-
                    The sub-directory of the VCS repository where Checkov checks are stored.

                    If omitted or submitted as an empty string, this defaults to the repository's root.
                  nullable: true
                  type: string
              required:
              - identifier
              type: object
            version:
              description: Version of Checkov to use.
              maxLength: 64
              type: string
          required:
          - name
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            environments:
              description: The list of environments this integration is linked to.
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - environments
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              required:
              - data
              type: object
            vcs-provider:
              description: The external checks VCS provider.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - vcs-providers
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - checkov-integrations
          type: string
      required:
      - type
      - attributes
      type: object
    CheckovIntegrationDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/CheckovIntegration'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    CheckovIntegrationListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/CheckovIntegration'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    Comment:
      description: An optional explanation for why run action was done.
      properties:
        comment:
          default: ''
          description: The reason.
          type: string
      type: object
    ConfigurationVersion:
      description: |-
        A Configuration Version describes the version of a Terraform configuration files.

        Each run is associated with a configuration version. It provides details of the source of the configuration files,
        the upload status, and the relationships to VCS and the workspace.
      properties:
        attributes:
          properties:
            auto-queue-runs:
              description: Indicates if a run should automatically be queued when the configuration has been uploaded.
              type: boolean
            created-at:
              description: Date/Time the configuration version was created.
              format: date-time
              readOnly: true
              type: string
            error-message:
              description: |-
                This field contains the error description, when this configuration version's
                status is `errored`.
              nullable: true
              readOnly: true
              type: string
            inputs:
              default: []
              description: |-
                The input variables definitions.

                Example:
                ```js
                [
                  {
                    "description": "The name of the CloudSQL database.",
                    "name": "cloudsql_database",
                    "type": "string"
                  },
                  {"...": ""..."}
                ]
                ```
              items:
                anyOf:
                - $ref: '#/components/schemas/RegistryInputOptional'
                - $ref: '#/components/schemas/RegistryInputRequired'
              readOnly: true
              type: array
            is-dry:
              description: |-
                Indicates the configuration version can only be used to perform dry runs that comprise the plan,
                cost estimation (if enabled) and policy checks.

                With this set to `true` the configuration cannot be used for an apply and never requires confirmation.
              type: boolean
            size:
              description: A blob size in bytes.
              nullable: true
              readOnly: true
              type: integer
            source:
              description: The origin for the configuration version.
              readOnly: true
              type: string
            status:
              description: |-
                The Configuration version's current status.

                * `pending` - waiting for the configuration files to upload.
                * `uploaded` - upload successful. At this point if the `auto-queue-runs: true` the new run should be `queued`.
                * `errored` - uploaded files post processing failed. Attribute `error-message` contains the details.
              enum:
              - errored
              - pending
              - uploaded
              readOnly: true
              type: string
            status-timestamps:
              additionalProperties:
                format: date-time
                type: string
              description: Date/Time of transition to each status that has occurred.
              readOnly: true
              type: object
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
            upload:
              description: URL for terraform configuration templates upload, that could be used to `PUT` a tar.gz archive
                of a local workspace directory. Available only in the create `configuration-versions` response.
              nullable: true
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            vcs-revision:
              description: When configuration version was uploaded from a VCS, this relation points to the Git commit information
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - vcs-revisions
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            workspace:
              description: The workspace the configuration version belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - workspaces
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - configuration-versions
          type: string
      required:
      - type
      type: object
    ConfigurationVersionDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/ConfigurationVersion'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    ConfigurationVersionListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/ConfigurationVersion'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    ConfirmRequest:
      description: A request to confirm a run. Includes optional time when apply should be queued.
      properties:
        apply-at:
          description: The UTC datetime at which the Apply should be queued.
          format: date-time
          nullable: true
          type: string
        comment:
          default: ''
          description: The reason.
          type: string
      type: object
    CostEstimate:
      description: |-
        A Cost Estimate is the details of the cost estimation phase of a `run` in Scalr.

        Cost estimation is optional and is enabled/disable per `environment`. If enabled a cost estimation
        is performed immediately after Terraform plan has completed for every run in every workspace,
        including dry runs.
      properties:
        attributes:
          properties:
            delta-monthly-cost:
              default: '0.000'
              description: The change in the estimated cost ($) from the previous run (if any).
              type: string
            error-message:
              description: When the cost estimate status is `errored`, this field contains the error description.
              nullable: true
              type: string
            matched-resources-count:
              description: |-
                The number of resources in the terraform plan, that were included into the estimation.

                Cost estimation in Scalr supports a number of terraform resources from major
                [cloud providers](https://docs.scalr.io/docs/cost-estimation)
              nullable: true
              type: integer
            prior-monthly-cost:
              default: '0.000'
              description: The estimated current monthly cost ($).
              type: string
            proposed-monthly-cost:
              default: '0.000'
              description: The estimated monthly cost ($) if the plan is applied.
              type: string
            resources-count:
              description: The total number of resources in the terraform plan.
              nullable: true
              type: integer
            status:
              description: |-
                The Cost estimate's current status.

                Transient states:
                * `pending` - Cost estimation has been created but not yet `queued`.
                * `queued` - Queued and waiting for capacity to be available.

                Final states:
                * `canceled` - The cost estimate has been canceled.
                * `errored` - The cost estimate has finished with an error. Attribute `error-message` contains the details.
                * `finished` - The cost estimate has completed successfully.
                * `unreachable` - The cost estimate will not run.
              enum:
              - pending
              - queued
              - finished
              - canceled
              - errored
              - unreachable
              type: string
            status-timestamps:
              additionalProperties:
                format: date-time
                type: string
              description: Date/Time of transition to each status that has occurred.
              type: object
            unmatched-resources-count:
              description: The number of resources in the terraform plan that were excluded from the estimation.
              nullable: true
              type: integer
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            breakdown:
              description: Link to download the cost breakdown [JSON formatted output](https://www.infracost.io/docs/multi_project/report/#examples).
              nullable: true
              type: string
            output:
              description: Link to download the raw output of the cost estimation.
              nullable: true
              type: string
            self:
              type: string
          readOnly: true
          type: object
        type:
          enum:
          - cost-estimates
          type: string
      required:
      - type
      type: object
    CostEstimateDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/CostEstimate'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    CreateUser:
      description: Represents a request to create an [IAM](https://docs.scalr.io/docs/identity-and-access-management) user.
      properties:
        attributes:
          properties:
            change-password-on-sign-in:
              default: false
              description: If set to `true`, the user will be asked to change the temporary password on the first sign in.
              type: boolean
            created-at:
              format: date-time
              nullable: true
              type: string
            email:
              maxLength: 255
              type: string
            full-name:
              maxLength: 100
              nullable: true
              type: string
            password:
              description: Must be at least 8 characters long and contain at least one digit, one lowercase letter, one uppercase
                letter, and one special character.
              maxLength: 64
              nullable: true
              type: string
            status:
              description: 'User status. Can be: `Active`, `Inactive`, `Pending`. Pending user will be activated after the
                first sign in.'
              enum:
              - Active
              - Inactive
              - Pending
              type: string
          required:
          - email
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            identity-providers:
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - identity-providers
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - users
          type: string
      required:
      - type
      - attributes
      type: object
    CreateUserDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/CreateUser'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    DatadogIntegration:
      properties:
        attributes:
          properties:
            api-key:
              description: The API key.
              maxLength: 255
              minLength: 1
              nullable: true
              type: string
            deployment-url:
              description: HTTP(s) URL.
              maxLength: 255
              nullable: true
              type: string
            err-message:
              description: Message from service that points to nature of a problem
              nullable: true
              readOnly: true
              type: string
            name:
              description: Name of Datadog integration
              maxLength: 128
              type: string
            status:
              description: Status of integration.
              enum:
              - active
              - disabled
              - failed
              type: string
          required:
          - name
          - api-key
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            account:
              description: The account this integration belongs to.
              properties:
                data:
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - accounts
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
          required:
          - account
          type: object
        type:
          enum:
          - datadog-integrations
          type: string
      required:
      - type
      - attributes
      - relationships
      type: object
    DatadogIntegrationDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/DatadogIntegration'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    DatadogIntegrationListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/DatadogIntegration'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    DockerIntegration:
      properties:
        attributes:
          properties:
            error-message:
              description: Last Docker registry connection test error message, if any.
              nullable: true
              readOnly: true
              type: string
            export-credentials:
              default: false
              description: Whether registry credentials should be exported into the run pipeline for OpenTofu OCI module access.
              type: boolean
            name:
              description: Name of the Docker integration.
              maxLength: 128
              type: string
            password:
              description: Docker registry password or personal access token used for authentication.
              nullable: true
              type: string
            registry-url:
              description: Docker registry URL. Use the registry endpoint used by the runtime. Its normalized host[:port]
                is used as the auth server address.
              maxLength: 512
              type: string
            status:
              description: Integration status after the latest connection test.
              enum:
              - active
              - disabled
              - failed
              - pending
              type: string
            username:
              description: Docker registry username used for authentication.
              maxLength: 255
              nullable: true
              type: string
          required:
          - name
          - registry-url
          - username
          - password
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            account:
              description: The account this integration belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - accounts
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - docker-integrations
          type: string
      required:
      - type
      - attributes
      type: object
    DockerIntegrationDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/DockerIntegration'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    DockerIntegrationListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/DockerIntegration'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    DriftDetectionSchedule:
      properties:
        attributes:
          properties:
            run-mode:
              description: The run mode of the drift detection.
              enum:
              - refresh-only
              - plan
              type: string
            schedule:
              description: The schedule of the drift detection.
              enum:
              - daily
              - weekly
              type: string
            workspace-filters:
              description: The workspace filters to monitor for drift.
              properties:
                environment-types:
                  items:
                    enum:
                    - production
                    - staging
                    - testing
                    - development
                    - unmapped
                    type: string
                  type: array
                name-patterns:
                  items:
                    type: string
                  type: array
                tags:
                  items:
                    type: string
                  type: array
              type: object
          required:
          - schedule
          type: object
        id:
          readOnly: true
          type: string
        links:
          additionalProperties:
            type: string
          type: object
        relationships:
          properties:
            environment:
              description: The environment this drift detection schedule belongs to.
              properties:
                data:
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - environments
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
          required:
          - environment
          type: object
        type:
          enum:
          - drift-detection-schedule
          type: string
      required:
      - type
      - attributes
      - relationships
      type: object
    DriftDetectionScheduleDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/DriftDetectionSchedule'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    DriftReport:
      properties:
        attributes:
          properties:
            reason:
              description: The reason for the drift report action.
              maxLength: 500
              nullable: true
              type: string
            status:
              description: The status of the drift report.
              enum:
              - pending
              - errored
              - in_progress
              - no_drift_detected
              - awaiting_manual_action
              - discarded
              - accept_state
              - reset_state
              type: string
            updated-at:
              description: The resource last update timestamp.
              format: date-time
              nullable: true
              type: string
            updated-by-email:
              description: The email of the last user, that updated this drift report.
              maxLength: 255
              nullable: true
              type: string
          required:
          - status
          type: object
        id:
          readOnly: true
          type: string
        links:
          additionalProperties:
            type: string
          type: object
        relationships:
          properties:
            run:
              description: The run this drift report belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - runs
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - drift-reports
          type: string
      required:
      - type
      - attributes
      type: object
    DriftReportDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/DriftReport'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    EnvLockReason:
      properties:
        reason:
          default: ''
          description: The reason for locking the environment.
          type: string
      type: object
    Environment:
      description: |-
        Environments are collections of related workspaces that correspond to functional areas, SDLC stages,
        projects or any grouping that is required.

        An account can have multiple environments.

        Workspaces within an environment are where Terraform configurations are run to deploy infrastructure,
        and where state files are stored.

        An Environment can have set of policy groups assigned that are applied to all workspaces in the environment.
        The Environment can also have variables, credentials, registry modules, and VCS providers
        that are available to every workspace.
      properties:
        attributes:
          properties:
            created-at:
              description: Date/Time the environment was created.
              format: date-time
              readOnly: true
              type: string
            created-by-email:
              nullable: true
              readOnly: true
              type: string
            favorite:
              description: Indicates whether the environment is marked as favorite by the current user.
              readOnly: true
              type: boolean
            is-federated-to-account:
              description: Allow all current and future environments to have access to this environment.
              type: boolean
            lock-reason:
              description: The reason (if any) that the environment has been locked.
              nullable: true
              readOnly: true
              type: string
            locked:
              description: Whether the environment is locked. If locked runs won't be queued to execute.
              readOnly: true
              type: boolean
            mask-sensitive-output:
              default: true
              description: Enable masking of the sensitive console output.
              type: boolean
            name:
              description: The name of the environment.
              maxLength: 255
              type: string
            permissions:
              readOnly: true
              type: object
            remote-backend:
              default: true
              description: Manages if Scalr exports the remote backend configuration and state storage for your infrastructure
                management. Disabling this feature will also prevent the ability to perform state locking, which ensures that
                concurrent operations do not conflict. Additionally, it will disable the capability to initiate CLI-driven
                runs through Scalr.
              type: boolean
            remote-backend-overridable:
              default: true
              description: Indicates if the remote backend configuration can be overridden on the workspace level.
              type: boolean
            status:
              readOnly: true
              type: string
            updated-at:
              description: Date/Time when the environment was last updated.
              format: date-time
              nullable: true
              readOnly: true
              type: string
          required:
          - name
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            account:
              description: The account that owns this environment.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - accounts
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            created-by:
              description: The user that created the environment.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - users
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            default-provider-configurations:
              description: Provider configurations used in the environment workspaces by default.
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - provider-configurations
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              required:
              - data
              type: object
            default-workspace-agent-pool:
              description: Default agent pool that will be set for the entire environment. It will be used by a workspace
                if no other pool is explicitly linked.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - agent-pools
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            drift-detection-schedules:
              description: The drift detection schedules for this environment
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - drift-detection-schedule
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              readOnly: true
              required:
              - data
              type: object
            locked-by:
              description: The user that locked this environment.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - users
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            policy-groups:
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - policy-groups
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              readOnly: true
              required:
              - data
              type: object
            provider-configurations:
              description: Provider configurations available for this environment.
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - provider-configurations
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              readOnly: true
              required:
              - data
              type: object
            storage-profile:
              description: The storage profile for this environment. If not set, the account's default storage profile will
                be used.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - storage-profiles
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            tags:
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - tags
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              required:
              - data
              type: object
            updated-by:
              description: The last user that updated this environment.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - users
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - environments
          type: string
      required:
      - type
      - attributes
      type: object
    EnvironmentDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/Environment'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    EnvironmentListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/Environment'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    Error:
      description: |-
        JSON:API Error object.

        see: https://jsonapi.org/format/#errors
      properties:
        code:
          nullable: true
          type: string
        detail:
          nullable: true
          type: string
        meta:
          nullable: true
          type: object
        source:
          nullable: true
          properties:
            pointer:
              type: string
          type: object
        status:
          nullable: true
          type: string
      type: object
    ErrorDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        errors:
          items:
            $ref: '#/components/schemas/Error'
          type: array
      type: object
    EventDefinition:
      description: |-
        Represents a Webhook Event Definition.

        Use [List Event Definitions](event-definitions.html#list-event-definitions) to obtain
        the all Scalr events available for use in webhooks. Then pass a number of the event IDs
        within `webhook.event` relationship in [Create Webook](webhooks.html#create-webhook) or
        [Update Webhook](webhooks.html#update-webhook).
      properties:
        attributes:
          properties:
            description:
              description: The event details.
              nullable: true
              type: string
            name:
              description: The name of the event.
              maxLength: 64
              type: string
          required:
          - name
          type: object
        id:
          readOnly: true
          type: string
        links:
          additionalProperties:
            type: string
          type: object
        type:
          enum:
          - event-definitions
          type: string
      required:
      - type
      - attributes
      type: object
    EventDefinitionDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/EventDefinition'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    EventDefinitionListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/EventDefinition'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    FederatedEnvironmentRelationship:
      description: |-
        Describes JSON:API generic Resource Identifier object.
        see https://jsonapi.org/format/#document-resource-identifier-objects
      properties:
        id:
          type: string
        type:
          enum:
          - environments
          type: string
      required:
      - type
      - id
      type: object
    FederatedEnvironmentRelationshipFieldsetsListingDocument:
      description: Document Listing.
      properties:
        data:
          items:
            $ref: '#/components/schemas/FederatedEnvironmentRelationship'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    Hook:
      description: Represents a reusable hook in the Scalr Hooks Registry.
      properties:
        attributes:
          properties:
            description:
              description: Brief description of the hook's purpose.
              maxLength: 255
              nullable: true
              type: string
            error-message:
              description: This field contains the error description, when this hook's status is `errored`.
              nullable: true
              readOnly: true
              type: string
            hook-blob-id:
              description: ID of the blob where hook source code is stored.
              nullable: true
              readOnly: true
              type: string
            interpreter:
              description: |-
                The interpreter used to execute the hook script.

                Examples:
                - `bash` - for shell scripts
                - `python` - for Python scripts
                - `node` - for JavaScript scripts

                **Important**: The interpreter specified here must be available in the execution environment.
                Make sure that the necessary dependencies are installed on the system where the hook
                will run. Scalr does not automatically install any runtime dependencies.


                This interpreter will be combined with the `scriptfile_path` to form
                the complete command to run the hook.
              maxLength: 64
              type: string
            name:
              description: Unique name for the hook.
              maxLength: 255
              type: string
            scriptfile-path:
              description: |-
                The path to the script file in the repository.

                This path is relative to the root of the repository. Examples:
                - `script.sh` - a script in the root directory
                - `scripts/hook.py` - a script in the scripts subdirectory
                - `/absolute/path.sh` - leading slash is automatically removed

                When the hook executes, the script runs in the Terraform workspace directory,
                not in the hook's directory. To access files within the hook directory, use
                the `SCALR_HOOK_DIR` environment variable:

                ```bash
                # Example: Read a config file from the hook directory
                cat "$SCALR_HOOK_DIR/config.json"

                # Example: Execute another script from the hook directory
                bash "$SCALR_HOOK_DIR/helpers/cleanup.sh"
                ```

                The `interpreter` attribute specifies the command used to execute this script.
              maxLength: 255
              type: string
            status:
              description: The status of the hook.
              enum:
              - pending
              - active
              - errored
              readOnly: true
              type: string
            updated-at:
              description: Timestamp of the last update.
              format: date-time
              readOnly: true
              type: string
            vcs-repo:
              description: A reference to the VCS repository for the hook.
              properties:
                branch:
                  description: |-
                    Branch of a repository the hook is associated with.
                    If omitted, the repository default branch will be used.
                  nullable: true
                  type: string
                identifier:
                  description: |-
                    A reference to the VCS repository.

                    For GitHub, GitHub Enterprise and GitLab the format is `<org>/<repo>`.
                    For Azure DevOps Services the format is `<org>/<project>/<repo>`.
                  type: string
              required:
              - identifier
              type: object
          required:
          - name
          - scriptfile-path
          - interpreter
          - vcs-repo
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            account:
              description: The account this hook belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - accounts
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            environments:
              description: The list of environments this hook is associated with.
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - environments
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              readOnly: true
              required:
              - data
              type: object
            readme:
              description: The readme for the hook.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - hook-readme
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            updated-by:
              description: The user who last updated the hook.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - users
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            vcs-provider:
              description: The VCS provider associated with the hook.
              properties:
                data:
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - vcs-providers
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            vcs-revision:
              description: The Git commit information when the hook was fetched from VCS.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - vcs-revisions
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
          required:
          - vcs-provider
          type: object
        type:
          enum:
          - hooks
          type: string
      required:
      - type
      - attributes
      - relationships
      type: object
    HookDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/Hook'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    HookEnvironmentLink:
      description: Represents the link between a hook and an environment.
      properties:
        attributes:
          properties:
            events:
              description: The list of events the hook is enabled for.
              items:
                enum:
                - pre-init
                - pre-plan
                - post-plan
                - pre-apply
                - post-apply
                type: string
              minItems: 1
              type: array
          required:
          - events
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            environment:
              description: The environment associated with this link.
              properties:
                data:
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - environments
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            hook:
              description: The hook associated with this link.
              properties:
                data:
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - hooks
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            vcs-provider:
              description: The VCS provider associated with the hook.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - vcs-providers
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            vcs-revision:
              description: The Git commit information when the hook was fetched from VCS.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - vcs-revisions
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
          required:
          - hook
          - environment
          type: object
        type:
          enum:
          - hook-environment-links
          type: string
      required:
      - type
      - attributes
      - relationships
      type: object
    HookEnvironmentLinkDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/HookEnvironmentLink'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    HookEnvironmentLinkListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/HookEnvironmentLink'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    HookListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/Hook'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    HookReadme:
      description: A HookReadme resource represents the readme file for a hook.
      properties:
        attributes:
          properties:
            content:
              description: The content of the readme file.
              type: string
            created-at:
              description: The time when the readme record was created.
              format: date-time
              type: string
          type: object
        id:
          readOnly: true
          type: string
        links:
          additionalProperties:
            type: string
          type: object
        type:
          enum:
          - hook-readme
          type: string
      required:
      - type
      type: object
    HookReadmeDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/HookReadme'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    IdentityProvider:
      description: The Identity Provider (IdP).
      properties:
        attributes:
          properties:
            idp-type:
              description: The IdP type. Can be one of `scalr`, `ldap`, or `saml`.
              enum:
              - scalr
              - ldap
              - saml
              type: string
            name:
              description: The IdP name.
              maxLength: 255
              type: string
            verification-status:
              description: Represents the verification status with the external IdP (SAML/LDAP only)
              enum:
              - pending
              - success
              - running
              type: string
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            account:
              description: The account this IdP belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - accounts
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - identity-providers
          type: string
      required:
      - type
      type: object
    IdentityProviderDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/IdentityProvider'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    InfracostIntegration:
      properties:
        attributes:
          properties:
            api-key:
              description: The API key.
              maxLength: 255
              minLength: 1
              nullable: true
              type: string
            err-message:
              description: Message from service that points to the nature of a problem
              nullable: true
              readOnly: true
              type: string
            is-shared:
              description: Indicates whether the integration is available in any environment of the account without directly
                linking it.
              type: boolean
            name:
              description: Name of the Infracost integration
              maxLength: 128
              type: string
            status:
              description: Status of the integration.
              enum:
              - active
              - disabled
              - failed
              type: string
          required:
          - name
          - api-key
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            environments:
              description: The list of environments this integration is linked to.
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - environments
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - infracost-integration
          type: string
      required:
      - type
      - attributes
      type: object
    InfracostIntegrationDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/InfracostIntegration'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    InfracostIntegrationListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/InfracostIntegration'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    Module:
      description: A terraform module in the [Private Module Registry](/docs/private-module-registry).
      properties:
        attributes:
          properties:
            created-at:
              description: The resource creation timestamp.
              format: date-time
              readOnly: true
              type: string
            description:
              description: |-
                The description of the module.

                By default, this is taken from the VCS repository description. For mono repos you likely
                want to override this behavior by passing this argument in a
                [Create Module](modules.html#create-a-module) operation.
              readOnly: true
              type: string
            error-message:
              description: This field contains the error description, when this module's status is `errored`.
              nullable: true
              readOnly: true
              type: string
            name:
              description: The module name.
              maxLength: 64
              type: string
            provider:
              description: |-
                A name of a system, this module was written for.

                For multi-cloud modules this argument should match terraform provider name (ex: `aws` or
                `google`), in other cases the convention is to name it `system`
              maxLength: 64
              type: string
            source:
              default: ''
              description: The `source` by which the module should be addressed from a HCL template.
              readOnly: true
              type: string
            status:
              description: |-
                The Module's current status.

                Initial status:
                * `pending` -  The initial status of a module once it has been created. Now Scalr will
                download the code from the VCS, and create a `module-version` resource for each matching
                Git tag.

                Ending statuses:
                * `no_version_tags` - a Module has been created, however the Module source repository
                has no tags.
                * `setup_complete` - a Module has been created, and at least one ModuleVersion has been
                successfully uploaded. Scalr assigns this status while some module-versions upload might
                be still in-progress. If you want to ensure a specific version was uploaded, you can poll
                [List Module Versions](module-versions.html#list-module-versions) for the `ok` status.
                * `errored` - Module has been created, however its synchronization has failed. Attribute
                `error-message` contains the details.
              enum:
              - no_version_tags
              - pending
              - setup_complete
              - errored
              readOnly: true
              type: string
            vcs-repo:
              properties:
                identifier:
                  description: |-
                    A reference to the module's VCS repository.

                    For GitHub, GitHub Enterprise and GitLab the format is `<org>/<repo>`.
                    Azure DevOps Services has the format `<org>/<project>/<repo>`.
                  type: string
                path:
                  description: |-
                    The repository sub-directory where the module source is located.
                    If omitted or submitted as an empty string, this defaults to the repository's root.
                  maxLength: 255
                  type: string
                tag-prefix:
                  description: |-
                    Specify this attribute when a module's releases are namespaced within a repository's
                    Git tags. This is usually the case for a mono repos with individually versioned
                    components. For example if your module is tagged `my-module/v1.0.0` it's `tag_prefix`
                    is  `my-module/`.
                  maxLength: 255
                  type: string
              required:
              - identifier
              type: object
          required:
          - vcs-repo
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            account:
              deprecated: true
              description: The relationship `account` is deprecated. Use `namespace` instead.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - accounts
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            created-by:
              description: The user who has created the module.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - users
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            environment:
              deprecated: true
              description: The relationship `environment` is deprecated. Use `namespace` instead.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - environments
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            latest-module-version:
              description: The module's latest version.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - module-versions
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            module-version:
              description: The module's latest successful version.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - module-versions
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            module-versions:
              description: The IDs of the module versions.
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - module-versions
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              readOnly: true
              required:
              - data
              type: object
            namespace:
              description: The module namespace this module belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - module-namespaces
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            vcs-provider:
              description: The module's VCS provider.
              properties:
                data:
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - vcs-providers
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
          required:
          - vcs-provider
          type: object
        type:
          enum:
          - modules
          type: string
      required:
      - type
      - attributes
      - relationships
      type: object
    ModuleDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/Module'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    ModuleListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/Module'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    ModuleNamespace:
      description: A terraform module namespace in the [Private Module Registry](../../module.html).
      properties:
        attributes:
          properties:
            is-shared:
              description: Whether the module namespace is shared across all current and future environments.
              type: boolean
            name:
              description: The module namespace name.
              maxLength: 255
              type: string
          type: object
        id:
          readOnly: true
          type: string
        links:
          additionalProperties:
            type: string
          type: object
        relationships:
          properties:
            environments:
              description: The environments in which the namespace modules can be used.
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - environments
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              required:
              - data
              type: object
            modules:
              description: The modules in the module namespace.
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - modules
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              readOnly: true
              required:
              - data
              type: object
            owners:
              description: The teams, the module namespace belongs to.
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - teams
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - module-namespaces
          type: string
      required:
      - type
      type: object
    ModuleNamespaceDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/ModuleNamespace'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    ModuleNamespaceListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/ModuleNamespace'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    ModuleResyncRequest:
      description: Represents a request to resync the object.
      properties:
        force:
          default: false
          description: |-
            Force resync module. If not equal to "true", only versions that did not exist before
            will be synchronized.
          type: boolean
      type: object
    ModuleTestProviderConfigurationLink:
      description: The provider configuration link attaches the provider configuration to an module test configuration.
      properties:
        attributes:
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            provider-configuration:
              properties:
                data:
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - provider-configurations
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            test-configuration:
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - test-configurations
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
          required:
          - provider-configuration
          type: object
        type:
          enum:
          - module-test-provider-configuration-links
          type: string
      required:
      - type
      - relationships
      type: object
    ModuleTestProviderConfigurationLinkDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/ModuleTestProviderConfigurationLink'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    ModuleTestProviderConfigurationLinkListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/ModuleTestProviderConfigurationLink'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    ModuleUsageNamespace:
      description: Represents terraform module usage namespace instance.
      properties:
        attributes:
          properties:
            namespace-name:
              description: Name of the namespace
              maxLength: 255
              type: string
            source:
              maxLength: 255
              type: string
          type: object
        id:
          readOnly: true
          type: string
        links:
          additionalProperties:
            type: string
          type: object
        relationships:
          properties:
            account:
              description: The account this usage instance belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - accounts
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            namespace-account:
              deprecated: true
              description: The attribute is deprecated. Namespaces are always created on the account level and can't be created
                on the environment level.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - accounts
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            namespace-environment:
              deprecated: true
              description: The attribute is deprecated. Namespaces are always created on the account level and can't be created
                on the environment level.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - environments
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - tf-module-namespaces
          type: string
      required:
      - type
      type: object
    ModuleUsageNamespaceDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/ModuleUsageNamespace'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    ModuleUsageNamespaceListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/ModuleUsageNamespace'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    ModuleVersion:
      description: A terraform module's version in the [Private Module Registry](../../module.html).
      properties:
        attributes:
          properties:
            created-at:
              description: The resource creation timestamp.
              format: date-time
              readOnly: true
              type: string
            dependencies:
              additionalProperties:
                anyOf:
                - type: string
                - type: object
                - items: {}
                  type: array
              description: The list of modules this version depends on.
              nullable: true
              readOnly: true
              type: object
            details:
              description: |-
                README contents.

                This file should be named README or README.md. The latter will be processed as
                [CommonMark](https://commonmark.org/).
              nullable: true
              readOnly: true
              type: string
            error-message:
              description: |-
                This field contains the error description, when this module version's status is
                `errored`.
              nullable: true
              readOnly: true
              type: string
            inputs:
              description: Input Variables.
              items:
                anyOf:
                - $ref: '#/components/schemas/RegistryInputOptional'
                - $ref: '#/components/schemas/RegistryInputRequired'
              nullable: true
              readOnly: true
              type: array
            is-forbidden-by:
              description: Indicates the source of the restriction.
              enum:
              - tofu_test
              nullable: true
              readOnly: true
              type: string
            is-root-module:
              description: |-
                Module version marked as root will allow the
                [creation of workspaces](../../module.html#deployable-modules) directly from the
                registry, as well as standard module usage.
              readOnly: true
              type: boolean
            outputs:
              description: Output Values.
              items:
                properties:
                  description:
                    default: ''
                    type: string
                  name:
                    default: ''
                    type: string
                  sensitive:
                    default: false
                    type: boolean
                  value:
                    anyOf:
                    - type: string
                    - type: object
                    - items: {}
                      type: array
                    default: ''
                    nullable: true
                type: object
              nullable: true
              readOnly: true
              type: array
            resources:
              description: Declared resources.
              items:
                properties:
                  address:
                    default: ''
                    type: string
                  type:
                    default: ''
                    type: string
                type: object
              nullable: true
              readOnly: true
              type: array
            size:
              description: A blob size in bytes.
              nullable: true
              readOnly: true
              type: integer
            status:
              description: |-
                The module version's current status.

                Initial status:
                * `not_uploaded` - Module version has been created, however the code has not been
                uploaded.

                Transitional statuses:
                * `pending` - Module version has been created and is currently synchronizing.
                * `pending_delete` - Module version has been deleted from the repository and pending
                deletion from the registry.

                Ending statuses:
                * `ok` - Module version has been created and the code has been uploaded.
                * `errored` - Module version has been created, however its synchronization has failed.
                Attribute `error-message` contains the details.
              enum:
              - not_uploaded
              - pending
              - ok
              - errored
              - pending_delete
              readOnly: true
              type: string
            version:
              description: Semantic Version.
              maxLength: 64
              type: string
          required:
          - version
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            download:
              description: The URL to download the tar.gz archive with module version source code.
              nullable: true
              readOnly: true
              type: string
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            module:
              description: The module this version belongs to.
              properties:
                data:
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - modules
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            vcs-revision:
              description: The Git commit information when the module version was uploaded from a VCS.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - vcs-revisions
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
          required:
          - module
          type: object
        type:
          enum:
          - module-versions
          type: string
      required:
      - type
      - attributes
      - relationships
      type: object
    ModuleVersionDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/ModuleVersion'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    ModuleVersionListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/ModuleVersion'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    Permission:
      description: |-
        The ability to perform an action on an object, enabling the corresponding functionality
        in the UI and API. e.g. `workspaces:create`, `vcs-providers:read`.

        The ID of a permission consist of two parts separated with `:` (colon):
         * Resource type in a plural form.
         * Action name. Generally the actions are CRUD, but some objects have specific actions, such as `runs:cancel`.

        If an `*` (asterisk) is used instead of the action name in the permission it means the permission allows all actions
        for the specified resource type. For example `workspaces:*` allows all actions with workspaces.

        An asterisk can be also used instead of the resource type. For example permission `*:read` gives read access to all resources.

        `*:*` - gives access to everything.

        Use [List Permissions](permissions.html#list-permissions) to obtain all possible permissions.
      properties:
        attributes:
          properties:
            applicable-scopes:
              description: Scope identities, this permission could be applied to in an [access policy](access-policies.html).
              items:
                enum:
                - account
                - environment
                - workspace
                type: string
              type: array
            description:
              description: Permission description.
              nullable: true
              type: string
          type: object
        id:
          readOnly: true
          type: string
        links:
          additionalProperties:
            type: string
          type: object
        type:
          enum:
          - permissions
          type: string
      required:
      - type
      type: object
    PermissionDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/Permission'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    PermissionListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/Permission'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    Plan:
      description: Provides details of a Terraform plan operation.
      properties:
        attributes:
          properties:
            execution-details:
              additionalProperties:
                type: string
              description: Plan execution details.
              type: object
            has-changes:
              description: Indicates if plan has proposed resource changes.
              type: boolean
            resource-additions:
              description: The number of new resources that will be added.
              nullable: true
              type: integer
            resource-changes:
              description: The number of resources that will be updated in place.
              nullable: true
              type: integer
            resource-destructions:
              description: The number of resources that will be destroyed.
              nullable: true
              type: integer
            status:
              description: |-
                The Plan's current status.

                Transient states:
                * `pending` - Plan has been created but not yet queued.
                * `queued` - Queued and waiting for capacity/and or quota to be available.
                * `running` - Running.

                Final states:
                * `canceled` - Plan canceled in some way.
                * `errored` - An error occurred during the plan. See `output` for details.
                * `finished` - Plan completed successfully.
                * `unreachable` - Plan will not be run.
              enum:
              - pending
              - queued
              - running
              - finished
              - canceled
              - errored
              - unreachable
              type: string
            status-timestamps:
              additionalProperties:
                format: date-time
                type: string
              description: Date/Time of transition to each status that has occurred.
              type: object
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            json-output:
              description: URL to retrieve the JSON execution plan
              nullable: true
              type: string
            output:
              description: Link to download the raw output of the terraform plan.
              nullable: true
              type: string
            self:
              type: string
          readOnly: true
          type: object
        type:
          enum:
          - plans
          type: string
      required:
      - type
      type: object
    PlanDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/Plan'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    Policy:
      description: |-
        A policy provides details of a single OPA policy
        as declared in [scalr-policy.hcl](../../opa.html#creating-policy-groups).
      properties:
        attributes:
          properties:
            enabled:
              default: true
              description: If set to `false`, the policy will not be evaluated during a run.
              readOnly: true
              type: boolean
            enforced-level:
              description: |-
                The policy's enforcement level.

                * `hard-mandatory` - cannot be overridden.
                * `soft-mandatory` - can be overridden through an approval by account admins
                and other authorized roles.
                * `advisory` - provides a warning only.
              enum:
              - hard-mandatory
              - soft-mandatory
              - advisory
              readOnly: true
              type: string
            name:
              description: The name of the policy.
              maxLength: 255
              type: string
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            policy-group:
              description: The policy group this policy belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - policy-groups
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - policies
          type: string
      required:
      - type
      type: object
    PolicyCheck:
      description: |-
        A policy check contains the details of the policy check phase of a run in Scalr.

        Policy check is performed immediately after Terraform plan and cost estimation have completed for every run
        in every workspace, including dry runs, where policies have been linked.
      properties:
        attributes:
          properties:
            permissions:
              type: object
            result:
              description: OPA policy decision.
              properties:
                advisory-failed:
                  default: 0
                  description: Number of policy checks that have failed with 'advisory' level.
                  type: integer
                duration-ms:
                  default: 0
                  description: Duration of the policy check operation.
                  type: integer
                hard-failed:
                  default: 0
                  description: Number of policy checks that have failed with "hard-mandatory" level.
                  type: integer
                passed:
                  default: 0
                  description: Number of policy checks that have passed.
                  type: integer
                policies:
                  description: List of policies that were checked.
                  items:
                    properties:
                      messages:
                        items:
                          type: string
                        type: array
                      name:
                        type: string
                      result:
                        enum:
                        - passed
                        - hard_failed
                        - soft_failed
                        - advisory_failed
                        type: string
                      unit-path:
                        type: string
                    required:
                    - name
                    - result
                    type: object
                  type: array
                result:
                  default: false
                  description: Indicates whether all policy checks have passed without failures.
                  type: boolean
                soft-failed:
                  default: 0
                  description: Number of policy checks that have failed with "soft-mandatory" level.
                  type: integer
                total-failed:
                  default: 0
                  description: Total number of policy checks that have failed.
                  type: integer
              type: object
            status:
              description: |-
                The Policy checks's current status.

                Transient states:
                * `pending` - The initial status of a policy check once it has been created.
                * `queued` - The policy check has been queued, awaiting backend service capacity to run terraform.
                * `running` - The policy check is running.
                * `soft_failed` Policy check has finished, and run hasn't passed policy with the `soft` level.
                  User having `policy-checks:override` permission can override the policy check decision,
                  and push this run next to apply.

                Final states:
                * `canceled` - The policy check has been canceled.
                * `errored` - The policy check has finished with an error. Attribute `error-message` contains the details.
                * `hard_failed` - Run hasn't passed policy with the `hard` level.
                * `overridden` - The policy check `soft_failed` status has been overridden.
                * `passed` - Run has successfully passed all configured policies.
                * `unreachable` - The policy check will not run.
              enum:
              - pending
              - queued
              - passed
              - errored
              - hard_failed
              - soft_failed
              - overridden
              - unreachable
              - canceled
              type: string
            status-timestamps:
              additionalProperties:
                format: date-time
                type: string
              description: Date/Time of transition to each status that has occurred.
              type: object
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            output:
              description: Link to download the policy check raw output.
              type: string
          readOnly: true
          type: object
        type:
          enum:
          - policy-checks
          type: string
      required:
      - type
      type: object
    PolicyCheckDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/PolicyCheck'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    PolicyCheckListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/PolicyCheck'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    PolicyCheckResult:
      description: Represents a terraform policy check result.
      properties:
        attributes:
          properties:
            messages:
              description: The messages returned by the policy check.
              items:
                type: string
              type: array
            name:
              description: The name of the policy.
              maxLength: 100
              type: string
            pull-request-number:
              description: The number of the pull request that triggered the policy check.
              nullable: true
              type: string
            pull-request-title:
              description: The title of the pull request that triggered the policy check.
              maxLength: 512
              nullable: true
              type: string
            result:
              description: The result of the policy check.
              enum:
              - passed
              - hard_failed
              - soft_failed
              - advisory_failed
              type: string
            unit-path:
              description: The terragrunt unit path relative to the working directory.
              nullable: true
              type: string
          type: object
        id:
          readOnly: true
          type: string
        links:
          additionalProperties:
            type: string
          type: object
        relationships:
          properties:
            environment:
              description: The environment associated with this policy check result.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - environments
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            policy-check:
              description: The policy check this result belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - policy-checks
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            run:
              description: The run associated with this policy check result.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - runs
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            workspace:
              description: The workspace associated with this policy check result.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - workspaces
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - policy-check-results
          type: string
      required:
      - type
      type: object
    PolicyCheckResultListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/PolicyCheckResult'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    PolicyDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/Policy'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    PolicyGroup:
      description: |-
        A policy group represents the collection of [OPA](/docs/policy-governance#open-policy-agent) policies stored in a VCS
        repository.

        When [linked to an environment](/docs/assign-policies),
        the policy group will participate in the policy check phase of every run in that environment.
      properties:
        attributes:
          properties:
            common-functions-folder:
              description: An absolute path from the repository root to the folder that contains common rego functions.
              maxLength: 255
              nullable: true
              type: string
            created-at:
              description: Date/Time the policy group was created.
              format: date-time
              readOnly: true
              type: string
            error-message:
              description: This field contains the error description when the group's status is `errored`.
              nullable: true
              readOnly: true
              type: string
            execute-as:
              default: policy_check
              description: The stage of the run to evaluate the policy group.
              enum:
              - pre_plan_check
              - policy_check
              type: string
            is-enforced:
              default: false
              description: Indicates whether the policy group is enforced in all environments.
              type: boolean
            name:
              description: The policy group name must be unique within the account and contain only letters, numbers, dashes
              maxLength: 100
              type: string
            opa-version:
              description: |-
                The version of Open Policy Agent to use for the policy evaluation.

                If omitted, the system default version is assigned.
              type: string
            status:
              description: |-
                Policy group current status.

                * `fetching` - waiting for policies to be synchronized with VCS.
                * `active` - synchronization completed, policy group is ready.
                * `errored` - synchronization has failed. Attribute `error-message` contains the details.
              enum:
              - fetching
              - active
              - errored
              readOnly: true
              type: string
            vcs-repo:
              properties:
                branch:
                  description: |-
                    Branch of a repository the policy group is associated with.
                    If omitted, the repository default branch will be used.
                  nullable: true
                  type: string
                identifier:
                  description: |-
                    A reference to your VCS repository.

                    For GitHub, GitHub Enterprise and GitLab the format is `<org>/<repo>`.
                    For Azure DevOps Services the format is `<org>/<project>/<repo>`.
                  type: string
                path:
                  default: ''
                  description: |-
                    The sub-directory of the VCS repository where OPA policies are stored.
                    The `scalr-policy.hcl` file must exist in this directory.
                    Files and directories outside this directory will be ignored during a sync from VCS,
                    and changing them won't trigger a policy group update.

                    If omitted or submitted as an empty string, this defaults to the repository's root.
                  nullable: true
                  type: string
              required:
              - identifier
              type: object
          required:
          - name
          - vcs-repo
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            account:
              description: The account this policy group belongs to.
              properties:
                data:
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - accounts
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            environments:
              description: List of environments this policy group is linked to.
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - environments
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              readOnly: true
              required:
              - data
              type: object
            policies:
              description: List of OPA policies this group contains.
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - policies
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              readOnly: true
              required:
              - data
              type: object
            vcs-provider:
              description: The policy group's VCS provider.
              properties:
                data:
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - vcs-providers
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            vcs-revision:
              description: The Git commit information when the policy group was fetched from VCS.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - vcs-revisions
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
          required:
          - vcs-provider
          - account
          type: object
        type:
          enum:
          - policy-groups
          type: string
      required:
      - type
      - attributes
      - relationships
      type: object
    PolicyGroupDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/PolicyGroup'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    PolicyGroupEnvironmentRelationship:
      properties:
        id:
          type: string
        type:
          enum:
          - environments
          type: string
      required:
      - id
      - type
      type: object
    PolicyGroupEnvironmentRelationshipFieldsetsListingDocument:
      description: Document Listing.
      properties:
        data:
          items:
            $ref: '#/components/schemas/PolicyGroupEnvironmentRelationship'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    PolicyGroupListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/PolicyGroup'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    ProviderConfiguration:
      description: The configuration of provider. Provider configuration is managed on the account scope and can be linked
        to environments or workspaces.
      properties:
        attributes:
          properties:
            apply-only:
              default: false
              description: Use this provider configuration only for the apply phase. This option is available only for built
                in AWS providers.
              type: boolean
            aws-access-key:
              description: AWS access key. This option is required with the `access_keys` credential type.
              nullable: true
              type: string
            aws-account-type:
              description: 'The type of AWS account, available options: `regular`, `gov-cloud`, `cn-cloud`.'
              enum:
              - regular
              - gov-cloud
              - cn-cloud
              nullable: true
              type: string
            aws-audience:
              description: The value of the aud claim for the identity token.
              minLength: 1
              nullable: true
              type: string
            aws-credentials-source:
              description: 'The credential source for the initial assume-role call. Applicable when the trusted entity type
                is `aws_service`. Available options: `Ec2InstanceMetadata`, `EcsContainer`. Defaults to `Ec2InstanceMetadata`.'
              enum:
              - Ec2InstanceMetadata
              - EcsContainer
              nullable: true
              type: string
            aws-credentials-type:
              description: 'The type of AWS credential, available options: `access_keys`, `role_delegation`, `oidc`.'
              enum:
              - role_delegation
              - access_keys
              - oidc
              nullable: true
              type: string
            aws-default-tags:
              description: Default tags to be applied to all resources created by this provider configuration.
              nullable: true
              type: object
            aws-default-tags-strategy:
              description: |-
                On duplicate key behaviour for default tags. Available options:
                - `skip`: the existing tags will not be changed
                - `update`: the existing tags will be replaced with the new one
              enum:
              - skip
              - update
              nullable: true
              type: string
            aws-external-id:
              description: External identifier to use when assuming the role. This option is required with the `role_delegation`
                credential type.
              minLength: 2
              nullable: true
              type: string
            aws-role-arn:
              description: Amazon Resource Name (ARN) of the IAM Role to assume. This option is required with the `role_delegation`
                and `oidc` credential type.
              minLength: 20
              nullable: true
              type: string
            aws-secret-key:
              description: AWS secret key. This option is required with the `access_keys` credential type.
              format: password
              nullable: true
              type: string
            aws-trusted-entity-type:
              description: 'Trusted entity type, available options: `aws_account`, `aws_service`. This option is required
                with the `role_delegation` credential type.'
              enum:
              - aws_account
              - aws_service
              nullable: true
              type: string
            azurerm-audience:
              description: The value of the aud claim for the identity token.
              maxLength: 600
              nullable: true
              type: string
            azurerm-auth-type:
              description: 'The type of azurerm credentials, available options: `client-secrets`, `oidc`.'
              enum:
              - client-secrets
              - oidc
              nullable: true
              type: string
            azurerm-client-id:
              description: The Client ID which should be used.
              nullable: true
              type: string
            azurerm-client-secret:
              description: The Client Secret which should be used.
              format: password
              nullable: true
              type: string
            azurerm-subscription-id:
              description: The Subscription ID which should be used.
              nullable: true
              type: string
            azurerm-tenant-id:
              description: The Tenant ID should be used.
              nullable: true
              type: string
            error-message:
              description: Contains the error message if the provider configuration is in an `errored` status.
              nullable: true
              readOnly: true
              type: string
            export-shell-variables:
              default: false
              description: Export provider variables into the run environment. This option is available only for built in
                providers.
              type: boolean
            google-auth-type:
              description: Authentication type to access GCP.
              enum:
              - service-account-key
              - oidc
              nullable: true
              type: string
            google-credentials:
              description: Service account key file in JSON format.
              format: password
              nullable: true
              type: string
            google-project:
              description: The default project to manage resources in. If another project is specified on a resource, it will
                take precedence.
              nullable: true
              type: string
            google-service-account-email:
              description: The service account email Scalr will use when authenticating to GCP.
              nullable: true
              type: string
            google-service-account-name:
              description: Service account name.
              nullable: true
              readOnly: true
              type: string
            google-use-default-project:
              default: true
              description: If the project will be enforced.
              nullable: true
              type: boolean
            google-workload-provider-name:
              description: The canonical name of the workload identity provider.
              nullable: true
              type: string
            is-allowed-in-module-test:
              default: false
              description: Indicates whether the provider configuration can be used in module tests.
              type: boolean
            is-custom:
              description: 'Determines if a provider configuration is custom. Note: custom provider configurations do not
                support built-in features like exporting as shell variables or on-save validation. Provider configuration
                will be validated during the run only.'
              nullable: true
              type: boolean
            is-shared:
              description: Indicates whether the provider configuration can be used in any workspace of the account without
                directly linking it to the environment.
              type: boolean
            name:
              description: The name of a Scalr provider configuration. This field is unique for the account.
              maxLength: 255
              type: string
            provider-name:
              anyOf:
              - $ref: '#/components/schemas/BuiltInProviderTypes'
              - type: string
              description: The name of a Terraform provider.
            scalr-hostname:
              description: The Scalr hostname which should be used.
              nullable: true
              type: string
            scalr-token:
              description: The Scalr token which should be used.
              format: password
              nullable: true
              type: string
            status:
              description: 'Provider configuration status. Can be: `active`, `errored`.'
              enum:
              - active
              - errored
              readOnly: true
              type: string
          required:
          - name
          - provider-name
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            account:
              description: The account this provider configuration belongs to.
              properties:
                data:
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - accounts
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            environments:
              description: The list of environments attached to the provider configuration. Can be used to bulk link/unlink
                environments.
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - environments
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              required:
              - data
              type: object
            owners:
              description: The teams, the provider configuration belongs to.
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - teams
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              required:
              - data
              type: object
            parameters:
              description: The list of arguments for provider configurations.
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - provider-configuration-parameters
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              readOnly: true
              required:
              - data
              type: object
            tags:
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - tags
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              required:
              - data
              type: object
          required:
          - account
          type: object
        type:
          enum:
          - provider-configurations
          type: string
      required:
      - type
      - attributes
      - relationships
      type: object
    ProviderConfigurationDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/ProviderConfiguration'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    ProviderConfigurationLink:
      description: The provider configuration link attaches the provider configuration to an environment or workspace.
      properties:
        attributes:
          properties:
            alias:
              description: Is used only for the workspace links. Meta-argument for using the same provider with different
                configurations for different resources.
              maxLength: 128
              nullable: true
              type: string
            default:
              default: false
              description: Is used only for the environment links. Indicates whether the provider configuration must be used
                in every environment workspace during runs without direct linking. This behaviour can be changed in specific
                workspace by creating direct workspace link without alias.
              readOnly: true
              type: boolean
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            environment:
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - environments
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            provider-configuration:
              properties:
                data:
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - provider-configurations
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            workspace:
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - workspaces
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
          required:
          - provider-configuration
          type: object
        type:
          enum:
          - provider-configuration-links
          type: string
      required:
      - type
      - relationships
      type: object
    ProviderConfigurationLinkDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/ProviderConfigurationLink'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    ProviderConfigurationLinkListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/ProviderConfigurationLink'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    ProviderConfigurationListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/ProviderConfiguration'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    ProviderConfigurationParameter:
      description: The argument of the provider configuration.
      properties:
        attributes:
          properties:
            description:
              description: Variable description.
              maxLength: 512
              nullable: true
              type: string
            hcl:
              default: false
              description: Indicates whether the value of the variable is a string of HCL code.
              type: boolean
            key:
              description: Parameter name.
              maxLength: 128
              type: string
            sensitive:
              default: false
              description: Indicates whether the value is sensitive. When set to `true` then the parameter is not visible
                after being written.
              type: boolean
            value:
              default: ''
              description: 'Parameter value. Not visible if sensitive: true is enabled'
              nullable: true
              type: string
          required:
          - key
          type: object
        id:
          readOnly: true
          type: string
        links:
          additionalProperties:
            type: string
          type: object
        relationships:
          properties:
            provider-configuration:
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - provider-configurations
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - provider-configuration-parameters
          type: string
      required:
      - type
      - attributes
      type: object
    ProviderConfigurationParameterDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/ProviderConfigurationParameter'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    ProviderConfigurationParameterListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/ProviderConfigurationParameter'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    ProviderConfigurationWorkspaceUsage:
      description: Represents a workspace that uses a specific provider configuration during runs.
      properties:
        direct-links-ids:
          description: The direct link ID(s) between the workspace and the provider configuration.
          items:
            type: string
          type: array
        environment-id:
          description: The ID of the environment.
          type: string
        environment-name:
          description: The name of the environment.
          type: string
        environment-permissions:
          description: The list of permissions on an environment.
          items:
            type: string
          type: array
        is-default-link:
          description: Whether the linked provider configuration is default in the environment.
          type: boolean
        workspace-id:
          description: The ID of the workspace.
          type: string
        workspace-name:
          description: The name of the workspace.
          type: string
        workspace-permissions:
          description: The list of permissions on a workspace.
          items:
            type: string
          type: array
      type: object
    ProviderConfigurationWorkspaceUsageFieldsetsListingDocument:
      description: Document Listing.
      properties:
        data:
          items:
            $ref: '#/components/schemas/ProviderConfigurationWorkspaceUsage'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    Reason:
      properties:
        reason:
          default: ''
          description: The reason for locking the workspace.
          type: string
      type: object
    RegistryInputOptional:
      properties:
        default:
          anyOf:
          - type: boolean
          - type: integer
          - type: number
          - type: string
          - items: {}
            type: array
          - type: object
          nullable: true
        description:
          nullable: true
          type: string
        name:
          type: string
        sensitive:
          default: false
          type: boolean
        type:
          nullable: true
          type: string
      required:
      - default
      - name
      type: object
    RegistryInputRequired:
      properties:
        description:
          nullable: true
          type: string
        name:
          type: string
        sensitive:
          default: false
          type: boolean
        type:
          nullable: true
          type: string
      required:
      - name
      type: object
    RemoteStateConsumerRelationship:
      description: Represents remote state consumers' relationship.
      properties:
        id:
          type: string
        type:
          enum:
          - workspaces
          type: string
      required:
      - type
      - id
      type: object
    RemoteStateConsumerRelationshipFieldsetsListingDocument:
      description: Document Listing.
      properties:
        data:
          items:
            $ref: '#/components/schemas/RemoteStateConsumerRelationship'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    Role:
      description: A collection of permissions that can be assigned to a user, team, or service account via an [access policy](/docs/identity-and-access-management#access-policies).
      properties:
        attributes:
          properties:
            description:
              description: The description of the role.
              maxLength: 255
              nullable: true
              type: string
            is-system:
              description: When `true` the role is built-in, and cannot be modified or deleted.
              readOnly: true
              type: boolean
            name:
              description: The name of the role.
              maxLength: 128
              type: string
          required:
          - name
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            account:
              description: The account this role belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - accounts
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            permissions:
              description: The collection of [permissions](permissions.html)
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - permissions
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - roles
          type: string
      required:
      - type
      - attributes
      type: object
    RoleDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/Role'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    RoleListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/Role'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    Run:
      description: |-
        A Run provides details of an entire run operation potentially comprising `plan`, `cost-estimation`,
        `policy-check` and `apply`.
      properties:
        attributes:
          properties:
            apply-at:
              description: The UTC datetime at which the Apply should be queued.
              format: date-time
              nullable: true
              readOnly: true
              type: string
            auto-apply:
              description: |-
                Indicates whether `terraform apply` should automatically run
                when terraform plan ends without error.
                Defaults to the current Auto Apply setting in the workspace.

                Auto-apply will be disallowed as a safety restriction if the
                workspace's current state version originates from an open Pull Request
                and the branch of this Pull Request is different from the branch of the
                run's configuration version. This prevents automatic applies when
                the current state is potentially based on unmerged code.
              type: boolean
            created-at:
              description: The resource creation timestamp.
              format: date-time
              readOnly: true
              type: string
            error-message:
              description: Contains error message, when the run has finished in `errored` status.
              nullable: true
              readOnly: true
              type: string
            has-changes:
              description: Specifies whether the plan has proposed resource changes.
              readOnly: true
              type: boolean
            iac-platform:
              default: terraform
              description: The IaC platform for the run.
              enum:
              - terraform
              - opentofu
              readOnly: true
              type: string
            inputs:
              description: Terraform input variables that were passed into the workspace.
              items:
                properties:
                  description:
                    type: string
                  name:
                    type: string
                  sensitive:
                    type: boolean
                  value:
                    anyOf:
                    - type: boolean
                    - type: integer
                    - type: number
                    - type: string
                    - items: {}
                      type: array
                    - type: object
                    nullable: true
                type: object
              nullable: true
              type: array
            is-destroy:
              description: |-
                Indicates if this run is a destroy that will destroy all provisioned infrastructure
                in the current state.
              type: boolean
            is-dry:
              type: boolean
            message:
              description: Specifies the explanation message to associate with the run.
              maxLength: 512
              nullable: true
              type: string
            permissions:
              readOnly: true
              type: object
            plan-at:
              description: The UTC datetime at which the Plan should be queued.
              format: date-time
              nullable: true
              type: string
            position-in-queue:
              nullable: true
              readOnly: true
              type: integer
            refresh:
              description: Specifies whether or not to refresh the state before a plan.
              nullable: true
              type: boolean
            refresh-only:
              description: Specifies whether this run should use the refresh-only plan mode.
              nullable: true
              type: boolean
            replace-addrs:
              description: Specifies an optional list of resource addresses to force replacement of a particular resource.
                If the plan would've normally produced an update or no-op action for this instance, Terraform will plan to
                replace it instead.
              items:
                maxLength: 262143
                type: string
              nullable: true
              type: array
            save-plan:
              description: The run is a saved plan run that stops at planned_and_saved status.
              nullable: true
              type: boolean
            source:
              anyOf:
              - $ref: '#/components/schemas/Sources'
              - type: string
              description: The origin of the run.
            status:
              description: |-
                The Run's current status.

                Initial status:
                * `pending` -  The initial status of a run once it has been created. Scalr processes each workspace's
                runs in the order they were queued, and a run remains pending until every run before it has completed.
                The exception are Runs having `is-dry: true`. Such runs don't modify a workspace's state, and could
                run in a parallel until the account's runs quota limit.

                Plan stage:
                * `plan_queued` - The plan is queued and waiting for capacity/and or quota to be available.
                * `planning` - Scalr is currently running `terraform plan`.
                * `planned` - `terraform plan` has finished. If the run's  workspace has `auto-apply: false`,
                Scalr pauses the run in this state, awaiting confirmation.
                * `planned_and_saved` - `terraform plan` has finished and the run waits for apply with the saved plan to be confirmed.
                * `confirmed` - Run has been confirmed to apply.

                Cost estimate stage (optional):
                * `cost_estimating` - Scalr is currently calculating the cost estimate for the plan.
                * `cost_estimated` - The cost estimation stage has finished.

                Policy check stage (optional):
                * `policy_checking` - Scalr is currently checking the plan against the environment's policies.
                * `policy_checked` -  The policy check succeeded, and Policy Engine will allow an apply to proceed.
                Scalr sometimes pauses in this state, depending on workspace settings.
                * `policy_override` - The policy check finished, but at least one `soft-mandatory` policy failed, so an
                apply cannot proceed without approval from a user having `policy-checks:override` permission.
                The run pauses in this state.

                Apply stage:
                * `apply_queued` -  The apply is queued and waiting for capacity/and or quota to be available.
                * `applying` - Scalr is currently running `terraform apply`.
                * `applied` - Scalr has successfully finished applying.

                Ending statuses:
                * `planned_and_finished` - Dry run's pipeline of Plan -> CostEstimate -> PolicyCheck stages have finished.
                This is the final state for dry run.
                * `planned_and_saved` - Saved plan run's plan has finished and is awaiting confirmation.
                The plan can be applied later using UI/API or terraform apply with the saved plan file.
                * `errored` - The run has finished with an error. The attribute `error-message` has the details.
                * `discarded` - A user chose not to continue this run from a confirmation state
                * `canceled` -  A user interrupted the run from any active stage.
              enum:
              - pending
              - pre_plan_queued
              - pre_plan_running
              - pre_plan_finished
              - plan_queued
              - planning
              - planned
              - confirmed
              - discarded
              - planned_and_finished
              - planned_and_saved
              - post_plan_running
              - post_plan_finished
              - cost_estimating
              - cost_estimated
              - policy_checking
              - policy_override
              - policy_checked
              - pre_apply_queued
              - pre_apply_running
              - pre_apply_finished
              - apply_queued
              - applying
              - applied
              - post_apply_running
              - post_apply_finished
              - errored
              - canceled
              readOnly: true
              type: string
            status-timestamps:
              additionalProperties:
                format: date-time
                type: string
              description: Timestamps of transition to prior and current statuses.
              readOnly: true
              type: object
            target-addrs:
              description: If non-empty, requests that Terraform should create a plan including actions only for the given
                objects (specified using resource address syntax) and the objects they depend on.
              items:
                maxLength: 262143
                type: string
              nullable: true
              type: array
            variables:
              default: []
              description: Run scope variables.
              items:
                properties:
                  category:
                    description: |-
                      * `terraform` - Values to be passed to terraform input variables of the same name.
                      * `env` - shell environment variables. They will be injected via `export` during a terraform run.
                    enum:
                    - terraform
                    - shell
                    - env
                    type: string
                  hcl:
                    default: false
                    description: Indicates whether the value of the variable is a string of HCL code.
                    type: boolean
                  key:
                    description: |-
                      Variable name. Must correspond to the name of a Terraform input variable in the configuration
                      if category is terraform.
                    maxLength: 128
                    type: string
                  sensitive:
                    default: false
                    description: |-
                      Indicates whether the value is sensitive. When set to `true` then the variable is not visible
                      after being written.
                    type: boolean
                  value:
                    default: ''
                    description: 'Variable value. Not visible if sensitive: true is enabled'
                    maxLength: 65535
                    nullable: true
                    type: string
                required:
                - key
                - category
                type: object
              nullable: true
              type: array
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            apply:
              description: Terraform apply phase.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - applies
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            configuration-version:
              description: The Run's configuration version.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - configuration-versions
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            cost-estimate:
              description: Cost estimation phase.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - cost-estimates
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            created-by:
              description: User that has triggered the run.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - users
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            created-by-run:
              description: Upstream Run that has triggered this run.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - runs
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            environment:
              description: The environment this run Run belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - environments
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            plan:
              description: Terraform plan phase.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - plans
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            policy-checks:
              description: Policy check phase.
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - policy-checks
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              readOnly: true
              required:
              - data
              type: object
            state-versions:
              description: The run's state versions.
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - state-versions
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              readOnly: true
              required:
              - data
              type: object
            status-transitions:
              description: Date/Time of transition to each status that has occurred.
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - status-transitions
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              readOnly: true
              required:
              - data
              type: object
            tags:
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - tags
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              readOnly: true
              required:
              - data
              type: object
            vcs-revision:
              description: Relation to the Git commit information, when the run's `configuration-version` source is `vcs`
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - vcs-revisions
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            workspace:
              description: The workspace this Run belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - workspaces
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - runs
          type: string
      required:
      - type
      type: object
    RunDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/Run'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    RunListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/Run'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    RunScheduleRule:
      description: |-
        A RunScheduleRule resource represents a rule for scheduling runs in a workspace.

        Each RunScheduleRule is associated with a workspace and has a schedule and a schedule mode.
        The schedule is a cron expression that determines when runs should be triggered.
        The schedule mode determines whether the triggered run is an 'apply' 'destroy' or 'refresh' run.
      properties:
        attributes:
          properties:
            schedule:
              description: Cron expression for scheduled runs. Time should be in UTC.
              maxLength: 255
              type: string
            schedule-mode:
              description: Mode of the scheduled run.
              enum:
              - apply
              - destroy
              - refresh
              type: string
          required:
          - schedule
          - schedule-mode
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            workspace:
              description: Workspace in which new runs will be created.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - workspaces
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - run-schedule-rules
          type: string
      required:
      - type
      - attributes
      type: object
    RunScheduleRuleDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/RunScheduleRule'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    RunScheduleRuleListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/RunScheduleRule'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    RunTrigger:
      description: |-
        Run triggers allow runs to queue automatically in downstream workspace on
        successful apply of runs in any of the upstream workspaces.
      properties:
        attributes:
          properties:
            created-at:
              description: The resource creation timestamp.
              format: date-time
              readOnly: true
              type: string
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            downstream:
              description: Downstream workspace in which new runs will be created.
              properties:
                data:
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - workspaces
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            upstream:
              description: Upstream workspace to track new runs.
              properties:
                data:
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - workspaces
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
          required:
          - upstream
          - downstream
          type: object
        type:
          enum:
          - run-triggers
          type: string
      required:
      - type
      - relationships
      type: object
    RunTriggerDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/RunTrigger'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    SSHKey:
      description: The SSH key resource. This resource represents an SSH key entity.
      properties:
        attributes:
          properties:
            created-at:
              description: The date and time when the SSH key was created.
              format: date-time
              readOnly: true
              type: string
            in-use:
              description: Indicates whether the SSH key is in use.
              readOnly: true
              type: boolean
            is-shared:
              description: Indicates whether the SSH key is available in any environment of the account without directly linking
                it.
              type: boolean
            name:
              description: The name of the SSH key.
              maxLength: 255
              type: string
            private-key:
              description: The private key of the SSH key.
              nullable: true
              type: string
          required:
          - private-key
          - name
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            account:
              description: The reference to the account that the SSH key belongs to.
              properties:
                data:
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - accounts
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            environments:
              description: The list of environments where the SSH key can be used.
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - environments
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              required:
              - data
              type: object
          required:
          - account
          type: object
        type:
          enum:
          - account-ssh-keys
          type: string
      required:
      - type
      - attributes
      - relationships
      type: object
    SSHKeyDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/SSHKey'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    SSHKeyListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/SSHKey'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    SamlIntegration:
      properties:
        attributes:
          properties:
            auto-redirect:
              description: If enabled, user will be redirected to IdP's login page.
              nullable: true
              type: boolean
            base-url:
              description: Base URL to construct SAML endpoints from. It needs to be a URL with the protocol, server, port
                and context path.
              nullable: true
              type: string
            debug:
              default: false
              description: Enables debug mode.
              type: boolean
            error-message:
              description: A message from an IdP that indicates a nature of the problem
              nullable: true
              readOnly: true
              type: string
            idp-cert-fingerprint:
              description: Instead of using the whole x509cert you can use a fingerprint in order to validate the SAMLResponse,
                but we don't recommend to use this method on production since is exploitable by collision attack.
              nullable: true
              type: string
            idp-cert-fingerprint-algorithm:
              default: sha256
              description: IDP cert fingerprint algorithm
              type: string
            idp-entity-id:
              description: Identifier of the IdP entity (must be a URI).
              type: string
            idp-single-logout-service-binding:
              description: SAML protocol binding to be used when returning the response message (urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect).
              nullable: true
              type: string
            idp-single-logout-service-response-url:
              description: URL location of IdP where SLO Response will be sent.
              nullable: true
              type: string
            idp-single-logout-service-url:
              description: URL target of IdP where Scalr will send the SLO Request.
              nullable: true
              type: string
            idp-single-sign-on-service-binding:
              description: SAML protocol binding to be used when returning the response message (urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect).
              nullable: true
              type: string
            idp-single-sign-on-service-url:
              description: URL target of IdP where Scalr will send the Authentication Request Message.
              type: string
            idp-x509cert:
              description: Public x509 certificate of the IdP.
              nullable: true
              type: string
            idp-x509cert-multi-encryption:
              description: IDP x509cert multi encryption
              nullable: true
              type: string
            idp-x509cert-multi-signing:
              description: In some scenarios IdP uses different certificates for signing/encryption, or is under key rollover
                phase and more than one certificate is published on IdP metadata. (when used, 'IdP x509cert' and 'IdP Cert
                Fingerprint' values are ignored)
              nullable: true
              type: string
            is-used:
              default: false
              description: Whether this SAML IdP is in use.
              readOnly: true
              type: boolean
            mapping-azure-aad-account-type:
              description: Account type.
              nullable: true
              type: string
            mapping-azure-aad-client-id:
              description: Client ID.
              nullable: true
              type: string
            mapping-azure-aad-enabled:
              default: false
              description: Use Azure Active Directory.
              type: boolean
            mapping-azure-aad-secret-key:
              description: Secret key.
              nullable: true
              type: string
            mapping-azure-aad-tenant-id:
              description: Tenant ID.
              nullable: true
              type: string
            mapping-email:
              description: Email attribute, in case usernames and emails are different.
              nullable: true
              type: string
            mapping-fullname:
              description: Display name attribute.
              nullable: true
              type: string
            mapping-groups:
              description: The name of the Groups attribute to use in SAML Assertion.
              nullable: true
              type: string
            mapping-separator:
              description: Groups separator
              nullable: true
              type: string
            name:
              description: Name of SAML integration
              maxLength: 255
              type: string
            security-allow-repeat-attribute-name:
              default: false
              description: If true, it will not raise an error when the Statement Element contains attribute elements with
                name duplicated.
              type: boolean
            security-authn-requests-signed:
              default: false
              description: Indicates whether the <samlp:AuthnRequest> messages sent by Scalr will be signed.
              type: boolean
            security-digest-algorithm:
              description: Algorithm that Scalr will use on digest process.
              enum:
              - http://www.w3.org/2001/04/xmlenc#sha256
              - http://www.w3.org/2001/04/xmldsig-more#sha384
              - http://www.w3.org/2001/04/xmlenc#sha512
              nullable: true
              type: string
            security-logout-request-signed:
              default: false
              description: Indicates whether the <samlp:logoutRequest> messages sent by Scalr will be signed.
              type: boolean
            security-logout-response-signed:
              default: false
              description: Indicates whether the <samlp:logoutResponse> messages sent by Scalr will be signed.
              type: boolean
            security-name-id-encrypted:
              default: false
              description: Indicates that the nameID of the <samlp:logoutRequest> sent by Scalr will be encrypted.
              type: boolean
            security-requested-authn-context:
              default: '["urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport"]'
              description: 'Leave empty and no AuthContext will be sent in the AuthNRequest,Set an array with the possible
                auth context values: ["urn:oasis:names:tc:SAML:2.0:ac:classes:Password", "urn:oasis:names:tc:SAML:2.0:ac:classes:X509"]'
              type: string
            security-requested-authn-context-comparison:
              default: exact
              description: Allows the authn comparison parameter to be set.
              enum:
              - exact
              - minimum
              - better
              - maximum
              type: string
            security-sign-metadata:
              description: Sign the Metadata. If enabled SP certificate must be provided.
              nullable: true
              type: boolean
            security-signature-algorithm:
              default: http://www.w3.org/2001/04/xmldsig-more#rsa-sha256
              description: Algorithm that Scalr will use on signing process.
              enum:
              - http://www.w3.org/2001/04/xmldsig-more#rsa-sha256
              - http://www.w3.org/2001/04/xmldsig-more#rsa-sha384
              - http://www.w3.org/2001/04/xmldsig-more#rsa-sha512
              type: string
            security-want-assertions-encrypted:
              default: false
              description: Indicates a requirement for the <saml:Assertion> elements received by Scalr to be encrypted.
              type: boolean
            security-want-assertions-signed:
              default: false
              description: Indicates a requirement for the <saml:Assertion> elements received by Scalr to be signed.
              type: boolean
            security-want-messages-signed:
              default: false
              description: Indicates a requirement for the <samlp:Response>, <samlp:LogoutRequest> and <samlp:LogoutResponse>
                elements received by Scalr to be signed.
              type: boolean
            security-want-name-id:
              default: true
              description: Indicates a requirement for the NameID element on the SAMLResponse received by this SP to be present.
              type: boolean
            security-want-name-id-encrypted:
              default: false
              description: Indicates a requirement for the NameID received by Scalr to be encrypted.
              type: boolean
            sp-assertion-consumer-service-binding:
              default: urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST
              description: SAML protocol binding to be used when returning the response message. It supports HTTP-POST binding
                only.
              type: string
            sp-default-entity-id:
              readOnly: true
              type: string
            sp-entity-id:
              description: Service provider entity identifier
              maxLength: 24
              type: string
            sp-name-id-format:
              default: urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified
              description: SP name id format
              type: string
            sp-private-key:
              description: SP private key
              nullable: true
              type: string
            sp-single-logout-service-binding:
              default: urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect
              description: SP single logout service binding
              type: string
            sp-x509cert:
              description: SP x509cert
              nullable: true
              type: string
            sp-x509cert-new:
              description: SP x509cert new
              nullable: true
              type: string
            status:
              description: Status of SAML integration.
              enum:
              - active
              - disabled
              - failed
              type: string
            strict:
              default: true
              description: If enabled, Scalr will reject unsigned or unencrypted messages when expects them to be signed or
                encrypted.
              type: boolean
            use-identifier-in-urls:
              default: true
              type: boolean
            verification-status:
              default: pending
              description: Represents the verification status with the IdP SAML provider)
              enum:
              - pending
              - success
              - running
              readOnly: true
              type: string
          required:
          - name
          - idp-entity-id
          - idp-single-sign-on-service-url
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            account:
              description: The account this SAML integration belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - accounts
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - saml-integration
          type: string
      required:
      - type
      - attributes
      type: object
    SamlIntegrationDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/SamlIntegration'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    SamlIntegrationListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/SamlIntegration'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    SecurityRules:
      description: Account security rules.
      properties:
        attributes:
          properties:
            enforce-agent-pool:
              description: Whether to require a self-hosted agent pool when creating workspaces.
              type: boolean
            max-personal-token-lifetime:
              description: The maximum lifetime of a personal user access token in minutes.
              nullable: true
              type: integer
            max-service-account-token-lifetime:
              description: The maximum lifetime of a service account access token in minutes.
              nullable: true
              type: integer
            require-owners-for-service-accounts:
              description: Whether to require owners for service accounts.
              type: boolean
          type: object
        id:
          readOnly: true
          type: string
        links:
          additionalProperties:
            type: string
          type: object
        type:
          enum:
          - security-rules
          type: string
      required:
      - type
      type: object
    SecurityRulesDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/SecurityRules'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    ServiceAccount:
      description: |-
        Represents a service account definition.

        A service account is a special type of account intended to represent a non-human user
        that needs to authenticate and be authorized to access data in Scalr APIs.
      properties:
        attributes:
          properties:
            created-at:
              format: date-time
              readOnly: true
              type: string
            description:
              description: The service account description.
              maxLength: 255
              nullable: true
              type: string
            email:
              description: A read-only field which is generated when a service account is created. Consists of `<name>@<account-domain>.scalr.io`
              readOnly: true
              type: string
            name:
              description: The service account name. The service account email will be created using this name.
              type: string
            status:
              description: 'The service account status. Can be: `Active`, `Inactive`.'
              enum:
              - Active
              - Inactive
              type: string
          required:
          - name
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            account:
              description: The account ID, the service account belongs to.
              properties:
                data:
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - accounts
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            created-by:
              description: The user who created the service account.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - users
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            owners:
              description: The teams, the service account belongs to.
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - teams
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              required:
              - data
              type: object
          required:
          - account
          type: object
        type:
          enum:
          - service-accounts
          type: string
      required:
      - type
      - attributes
      - relationships
      type: object
    ServiceAccountDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/ServiceAccount'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    ServiceAccountListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/ServiceAccount'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    ServiceAccountTemporaryToken:
      properties:
        access-token:
          type: string
        expire-time:
          format: date-time
          type: string
      type: object
    SlackChannel:
      properties:
        id:
          type: string
        is-private:
          type: boolean
        name:
          type: string
      required:
      - id
      - is-private
      - name
      type: object
    SlackChannelFieldsetsListingDocument:
      description: Document Listing.
      properties:
        data:
          items:
            $ref: '#/components/schemas/SlackChannel'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    SlackConnection:
      properties:
        attributes:
          properties:
            slack-workspace-name:
              description: The name of connected Slack workspace.
              maxLength: 255
              type: string
          type: object
        id:
          readOnly: true
          type: string
        links:
          additionalProperties:
            type: string
          type: object
        relationships:
          properties:
            account:
              description: The account this connection belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - accounts
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - slack-connections
          type: string
      required:
      - type
      type: object
    SlackConnectionDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/SlackConnection'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    SlackIntegration:
      properties:
        attributes:
          properties:
            channel-id:
              description: A Slack channel ID to which to send messages.
              maxLength: 24
              type: string
            err-message:
              description: Message from service that points to nature of a problem
              nullable: true
              readOnly: true
              type: string
            events:
              description: Events for which to get notifications.
              items:
                enum:
                - run_approval_required
                - run_success
                - run_errored
                - drift_detected
                type: string
              type: array
            is-apply-only:
              default: false
              description: Whether to notify about success or failure from the apply step only
              type: boolean
            name:
              description: Name of Slack integration
              maxLength: 128
              type: string
            run-mode:
              default: all
              description: What type of runs should be reported.
              enum:
              - all
              - apply
              - dry
              type: string
            status:
              description: Status of integration.
              enum:
              - active
              - disabled
              - failed
              type: string
          required:
          - name
          - channel-id
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            account:
              description: The account this integration belongs to.
              properties:
                data:
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - accounts
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            connection:
              description: Associated Slack App connection.
              properties:
                data:
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - slack-connections
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            environments:
              description: Environments source of events.
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - environments
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  type: array
              required:
              - data
              type: object
            workspaces:
              description: Workspaces source of events.
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - workspaces
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              required:
              - data
              type: object
          required:
          - account
          - connection
          - environments
          type: object
        type:
          enum:
          - slack-integrations
          type: string
      required:
      - type
      - attributes
      - relationships
      type: object
    SlackIntegrationDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/SlackIntegration'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    SlackIntegrationListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/SlackIntegration'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    SoftwareVersion:
      description: Represents a software version.
      properties:
        attributes:
          properties:
            created-at:
              description: The resource creation timestamp.
              format: date-time
              readOnly: true
              type: string
            default:
              default: false
              description: |-
                Default version to use when workspace or policy-group creation request
                doesn't specify a version.
              readOnly: true
              type: boolean
            deprecated:
              default: false
              description: |-
                Indicates that this software-version is deprecated,
                and thus not available for new workspaces or policy-groups.
              type: boolean
            error:
              description: |-
                This field contains the error description,
                when this software-version's status is `failed`.
              nullable: true
              readOnly: true
              type: string
            hash:
              description: Container image SHA256 hash.
              nullable: true
              readOnly: true
              type: string
            image:
              description: Reference to a container image in OCI registry.
              maxLength: 255
              nullable: true
              type: string
            latest:
              default: false
              description: |-
                Indicates that this software-version is the latest one
                for the given software-type.
              readOnly: true
              type: boolean
            software-type:
              description: The type of the software.
              enum:
              - opa
              - terraform
              - infracost
              - opentofu
              - terragrunt
              - checkov
              type: string
            status:
              description: The Docker image status.
              enum:
              - pending
              - failed
              - active
              - not-available
              readOnly: true
              type: string
            version:
              description: Semantic Version.
              maxLength: 255
              type: string
          required:
          - version
          - software-type
          - image
          type: object
        id:
          readOnly: true
          type: string
        links:
          additionalProperties:
            type: string
          type: object
        type:
          enum:
          - software-versions
          type: string
      required:
      - type
      - attributes
      type: object
    SoftwareVersionDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/SoftwareVersion'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    SoftwareVersionListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/SoftwareVersion'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    Sources:
      enum:
      - api
      - cli
      - scalr-cli
      - configuration-version
      - service-catalog
      - ui
      - vcs
      - vcs-task
      - run-trigger
      - schedule
      - restart
      - restart-ci
      - assistant
      - dashboard-run
      - dashboard-workspace
      - workspaces-environment
      - workspaces-environment-bulk
      - workspaces-account
      - workspaces-account-bulk
      - reports-iac-versions
      - reports-stale-workspaces
      - auto-destroy
      - comment-github
      - comment-azure
      - comment-gitlab
      - check-github
      - vscode
      - drift-detection
      type: string
    SsoBypassUsersRelationship:
      description: Represents SSO bypass users' relationship.
      properties:
        id:
          type: string
        type:
          enum:
          - users
          type: string
      required:
      - type
      - id
      type: object
    SsoBypassUsersRelationshipFieldsetsListingDocument:
      description: Document Listing.
      properties:
        data:
          items:
            $ref: '#/components/schemas/SsoBypassUsersRelationship'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    StateVersion:
      description: A State version is the version of a state file associated with a workspace.
      properties:
        attributes:
          properties:
            created-at:
              description: The resource creation timestamp.
              format: date-time
              readOnly: true
              type: string
            force:
              type: boolean
            lineage:
              description: Lineage of the state version. Should match the lineage extracted from the `terraform.tfstate`.
              maxLength: 255
              nullable: true
              type: string
            md5:
              description: The MD5 hash of the terraform.tfstate.
              maxLength: 32
              type: string
            modules:
              additionalProperties:
                additionalProperties:
                  type: integer
                type: object
              description: The list of modules.
              readOnly: true
              type: object
            outputs:
              description: The list of output values.
              items:
                properties:
                  name:
                    default: ''
                    type: string
                  sensitive:
                    default: false
                    type: boolean
                  value:
                    anyOf:
                    - type: string
                    - type: object
                    - items: {}
                      type: array
                    default: ''
                    nullable: true
                type: object
              nullable: true
              readOnly: true
              type: array
            providers:
              additionalProperties:
                additionalProperties:
                  type: integer
                type: object
              description: The list of providers.
              readOnly: true
              type: object
            resources:
              description: The list of resources.
              items:
                properties:
                  address:
                    default: ''
                    type: string
                  index:
                    anyOf:
                    - type: string
                    - type: integer
                    nullable: true
                  module:
                    default: ''
                    nullable: true
                    type: string
                  type:
                    default: ''
                    type: string
                type: object
              readOnly: true
              type: array
            serial:
              description: The serial of the state version which must match the `serial` value from the `terraform.tfstate`.
              type: integer
            size:
              description: Size of the `terraform.tfstate` in bytes.
              readOnly: true
              type: integer
            state:
              description: Base64 encoded `terraform.tfstate`
              nullable: true
              type: string
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            download:
              description: The URL to download the `terraform.tfstate`.
              nullable: true
              readOnly: true
              type: string
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            next-state-version:
              description: Next state version for the workspace to which state version is associated.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - state-versions
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            previous-state-version:
              description: Previous state version for the workspace to which state version is associated.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - state-versions
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            run:
              description: The optional run associated with the state version.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - runs
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            workspace:
              description: The workspace, this state version belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - workspaces
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - state-versions
          type: string
      required:
      - type
      type: object
    StateVersionDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/StateVersion'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    StateVersionListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/StateVersion'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    StatusTransition:
      description: Status transition of entity.
      properties:
        attributes:
          properties:
            occurred-at:
              format: date-time
              type: string
            reason:
              nullable: true
              type: string
            status:
              type: string
          required:
          - status
          - occurred-at
          type: object
        id:
          readOnly: true
          type: string
        links:
          additionalProperties:
            type: string
          type: object
        relationships:
          properties:
            user:
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - users
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - status-transitions
          type: string
      required:
      - type
      - attributes
      type: object
    StatusTransitionDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/StatusTransition'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    StorageProfile:
      description: |-
        API resource describing the storage profile, where
        Scalr will store this account blobs: e.g. source code, terraform state, and logs.
      properties:
        attributes:
          properties:
            aws-s3-audience:
              description: The value of the aud claim for the identity token.
              maxLength: 255
              minLength: 1
              nullable: true
              type: string
            aws-s3-bucket-name:
              description: AWS S3 Storage bucket name. Bucket must already exist.
              maxLength: 63
              minLength: 3
              nullable: true
              type: string
            aws-s3-region:
              description: AWS S3 bucket region.
              maxLength: 63
              minLength: 3
              nullable: true
              type: string
            aws-s3-role-arn:
              description: Amazon Resource Name (ARN) of the IAM Role to assume.
              maxLength: 2048
              minLength: 20
              nullable: true
              type: string
            azurerm-audience:
              description: Azure audience for authentication
              maxLength: 255
              nullable: true
              type: string
            azurerm-client-id:
              description: Azure client ID for authentication
              maxLength: 255
              nullable: true
              type: string
            azurerm-container-name:
              description: Azure storage container name
              maxLength: 255
              nullable: true
              type: string
            azurerm-storage-account:
              description: Azure storage account name
              maxLength: 255
              nullable: true
              type: string
            azurerm-tenant-id:
              description: Azure tenant ID for authentication
              maxLength: 255
              nullable: true
              type: string
            backend-type:
              description: Type of backend
              enum:
              - google
              - aws-s3
              - azurerm
              type: string
            created-at:
              description: The resource creation timestamp.
              format: date-time
              readOnly: true
              type: string
            default:
              default: false
              description: The default storage profile.
              type: boolean
            error-message:
              description: This field contains the last error description, when these settings doesn't work properly.
              nullable: true
              readOnly: true
              type: string
            google-credentials:
              description: |-
                Service Account JSON key.
                Required IAM roles: `Storage Admin` assigned on a `google-storage-bucket` bucket.
                See: [use IAM with bucket](https://cloud.google.com/storage/docs/access-control/using-iam-permissions#bucket-iam).
              format: password
              nullable: true
              type: object
            google-encryption-key:
              description: |-
                Optional [customer supplied encryption key](https://cloud.google.com/storage/docs/encryption/customer-supplied-keys).
                Must be exactly 32 bytes, encoded into base64:
                ```sh
                $ openssl rand 32 | base64
                NfsPPHBVNlU8ZLBU9BeBIoL29rqtduyQAEw3vxf6kaY=
                ```
              format: password
              nullable: true
              type: string
            google-project:
              description: Google Cloud project ID.
              nullable: true
              type: string
            google-storage-bucket:
              description: Google Storage bucket name. Bucket must already exist.
              maxLength: 222
              nullable: true
              type: string
            is-system:
              default: false
              description: Whether the storage profile is a system profile.
              readOnly: true
              type: boolean
            name:
              description: The name of the storage profile.
              maxLength: 255
              type: string
            updated-at:
              description: The resource last update timestamp.
              format: date-time
              nullable: true
              readOnly: true
              type: string
          required:
          - name
          - backend-type
          type: object
        id:
          readOnly: true
          type: string
        links:
          additionalProperties:
            type: string
          type: object
        type:
          enum:
          - storage-profiles
          type: string
      required:
      - type
      - attributes
      type: object
    StorageProfileDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/StorageProfile'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    StorageProfileListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/StorageProfile'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    Tag:
      description: |-
        Tag is a keyword or term associated with a Scalr resource.
        It is used to label resources across the account to help to identify them, improve searchability
        or can even participate in a terraform run e.g. as a part of metadata for policy decision.

        Tags are unique within the account. Deleted tags will be removed from associated resources.
      properties:
        attributes:
          properties:
            name:
              description: The name of the tag. It must be unique within the account.
              maxLength: 255
              type: string
          required:
          - name
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            account:
              description: The account this tag belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - accounts
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - tags
          type: string
      required:
      - type
      - attributes
      type: object
    TagDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/Tag'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    TagListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/Tag'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    TagRelationship:
      description: Represents tags' relationship.
      properties:
        id:
          type: string
        type:
          enum:
          - tags
          type: string
      required:
      - type
      - id
      type: object
    TagRelationshipFieldsetsListingDocument:
      description: Document Listing.
      properties:
        data:
          items:
            $ref: '#/components/schemas/TagRelationship'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    Team:
      description: |-
        A [IAM](https://docs.scalr.io/docs/identity-and-access-management) team is used to organize users into logical units.

        A team can not be used to group service accounts, only standard users.
      properties:
        attributes:
          properties:
            description:
              description: The verbose description of the team.
              maxLength: 255
              nullable: true
              type: string
            name:
              description: The name of the team.
              maxLength: 255
              type: string
          required:
          - name
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            account:
              description: The account this team belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - accounts
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            identity-provider:
              description: Identity provider of the team. Can be internal (Scalr) or external (LDAP/SAML)
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - identity-providers
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            users:
              description: The list of users in the team.
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - users
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - teams
          type: string
      required:
      - type
      - attributes
      type: object
    TeamDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/Team'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    TeamListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/Team'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    TerraformModuleUsage:
      description: Represents terraform module usage instance.
      properties:
        attributes:
          properties:
            module:
              type: string
            parent-module:
              nullable: true
              type: string
            source:
              maxLength: 255
              nullable: true
              type: string
            versions-used-count:
              description: Number of module versions.
              type: integer
            workspaces-count:
              description: Number of module workspaces.
              type: integer
          required:
          - module
          - versions-used-count
          - workspaces-count
          type: object
        id:
          readOnly: true
          type: string
        links:
          additionalProperties:
            type: string
          type: object
        relationships:
          properties:
            namespace:
              description: The namespace this usage instance belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - tf-module-namespaces
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - tf-module-usages
          type: string
      required:
      - type
      - attributes
      type: object
    TerraformModuleUsageDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/TerraformModuleUsage'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    TerraformModuleUsageListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/TerraformModuleUsage'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    TerraformModuleUsageSource:
      description: Represents terraform module source
      properties:
        source:
          type: string
      required:
      - source
      type: object
    TerraformModuleUsageSourceFieldsetsListingDocument:
      description: Document Listing.
      properties:
        data:
          items:
            $ref: '#/components/schemas/TerraformModuleUsageSource'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    TerraformModuleUsageVersion:
      description: Represents terraform module version
      properties:
        version:
          type: string
      type: object
    TerraformModuleUsageVersionFieldsetsListingDocument:
      description: Document Listing.
      properties:
        data:
          items:
            $ref: '#/components/schemas/TerraformModuleUsageVersion'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    TerraformModuleVersionUsage:
      description: Represents terraform module version usage instance.
      properties:
        attributes:
          properties:
            created-at:
              format: date-time
              type: string
            version:
              maxLength: 64
              nullable: true
              type: string
          required:
          - created-at
          type: object
        id:
          readOnly: true
          type: string
        links:
          additionalProperties:
            type: string
          type: object
        relationships:
          properties:
            environment:
              description: The environment this usage instance belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - environments
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            workspace:
              description: The workspace this usage instance belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - workspaces
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - tf-module-version-usages
          type: string
      required:
      - type
      - attributes
      type: object
    TerraformModuleVersionUsageListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/TerraformModuleVersionUsage'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    TerraformProviderUsage:
      description: Represents terraform provider usage instance.
      properties:
        attributes:
          properties:
            provider:
              type: string
            source:
              maxLength: 255
              type: string
            versions-used-count:
              type: integer
            workspaces-count:
              type: integer
          required:
          - provider
          - source
          - versions-used-count
          - workspaces-count
          type: object
        id:
          readOnly: true
          type: string
        links:
          additionalProperties:
            type: string
          type: object
        type:
          enum:
          - tf-provider-usages
          type: string
      required:
      - type
      - attributes
      type: object
    TerraformProviderUsageDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/TerraformProviderUsage'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    TerraformProviderUsageListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/TerraformProviderUsage'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    TerraformProviderUsageSource:
      description: Represents terraform provider source
      properties:
        source:
          type: string
      required:
      - source
      type: object
    TerraformProviderUsageSourceFieldsetsListingDocument:
      description: Document Listing.
      properties:
        data:
          items:
            $ref: '#/components/schemas/TerraformProviderUsageSource'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    TerraformProviderUsageVersion:
      description: Represents terraform provider version
      properties:
        version:
          type: string
      required:
      - version
      type: object
    TerraformProviderUsageVersionFieldsetsListingDocument:
      description: Document Listing.
      properties:
        data:
          items:
            $ref: '#/components/schemas/TerraformProviderUsageVersion'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    TerraformProviderVersionUsage:
      description: Represents terraform provider version usage.
      properties:
        attributes:
          properties:
            created-at:
              format: date-time
              type: string
            version:
              maxLength: 64
              nullable: true
              type: string
          required:
          - version
          - created-at
          type: object
        id:
          readOnly: true
          type: string
        links:
          additionalProperties:
            type: string
          type: object
        relationships:
          properties:
            environment:
              description: The environment this usage instance belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - environments
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            workspace:
              description: The workspace this usage belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - workspaces
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - tf-provider-version-usages
          type: string
      required:
      - type
      - attributes
      type: object
    TerraformProviderVersionUsageListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/TerraformProviderVersionUsage'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    TerraformResourceInstanceUsage:
      description: Represents terraform resource instance usage
      properties:
        attributes:
          properties:
            address:
              description: Resource instance address. Combines module, name and index of the resource.
              maxLength: 255
              type: string
            external-id:
              description: External ID of the resource instance.
              maxLength: 1024
              type: string
            is-active:
              default: true
              description: Indicates if the resource instance is active.
              type: boolean
            is-duplicate:
              default: false
              description: Indicates if the resource is a duplicate
              type: boolean
            name:
              description: Resource instance name.
              maxLength: 255
              type: string
            updated-at:
              description: Time when the resource instance was created or updated.
              format: date-time
              type: string
            updated-by-email:
              description: The email of the user who create or update this resource instance.
              maxLength: 100
              type: string
            workspace-name:
              description: Name of the workspace this resource instance belongs to.
              maxLength: 255
              type: string
          required:
          - name
          - external-id
          - address
          - workspace-name
          - updated-at
          - updated-by-email
          type: object
        id:
          readOnly: true
          type: string
        links:
          additionalProperties:
            type: string
          type: object
        relationships:
          properties:
            environment:
              description: The environment this resource instance belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - environments
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            resource:
              description: The resource this instance belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - tf-resource-usages
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            run:
              description: The run which created or updated this resource instance.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - runs
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            state-version:
              description: The state version this resource instance belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - state-versions
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            workspace:
              description: The workspace this resource instance belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - workspaces
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - tf-resource-instance-usages
          type: string
      required:
      - type
      - attributes
      type: object
    TerraformResourceInstanceUsageListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/TerraformResourceInstanceUsage'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    TerraformResourceUsage:
      description: Represents terraform resource usage instance
      properties:
        attributes:
          properties:
            active-instances-count:
              description: The total number of resource instances which are present in the infrastructure.
              type: integer
            deleted-instances-count:
              description: The total number of resource instances which are deleted from the infrastructure.
              type: integer
            name:
              description: Resource name.
              maxLength: 255
              type: string
            provider-type:
              description: Terraform provider by which resource is managed.
              maxLength: 64
              type: string
            workspaces-count:
              description: The total number of workspaces where this resource is used.
              type: integer
          required:
          - name
          - provider-type
          - active-instances-count
          - deleted-instances-count
          - workspaces-count
          type: object
        id:
          readOnly: true
          type: string
        links:
          additionalProperties:
            type: string
          type: object
        relationships:
          properties:
            account:
              description: The account this resource belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - accounts
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - tf-resource-usages
          type: string
      required:
      - type
      - attributes
      type: object
    TerraformResourceUsageDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/TerraformResourceUsage'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    TerraformResourceUsageListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/TerraformResourceUsage'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    TerraformResourceUsageProviderType:
      description: Represents terraform resource provider type
      properties:
        provider-type:
          description: Terraform provider type.
          type: string
      required:
      - provider-type
      type: object
    TerraformResourceUsageProviderTypeFieldsetsListingDocument:
      description: Document Listing.
      properties:
        data:
          items:
            $ref: '#/components/schemas/TerraformResourceUsageProviderType'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    TerraformVersionUsage:
      description: Represents terraform version usage instance.
      properties:
        attributes:
          properties:
            created-at:
              format: date-time
              type: string
            iac-platform:
              description: The IaC platform of the usage instance.
              enum:
              - terraform
              - opentofu
              type: string
            is-auto:
              description: Indicates whether the version is auto-detected
              type: boolean
            version:
              maxLength: 64
              type: string
          required:
          - version
          - created-at
          type: object
        id:
          readOnly: true
          type: string
        links:
          additionalProperties:
            type: string
          type: object
        relationships:
          properties:
            account:
              description: The account this usage instance belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - accounts
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            environment:
              description: The environment this usage instance belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - environments
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            workspace:
              description: The workspace this usage instance belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - workspaces
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - tf-version-usages
          type: string
      required:
      - type
      - attributes
      type: object
    TerraformVersionUsageListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/TerraformVersionUsage'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    TerraformVersionUsageVersion:
      description: Represents terraform version
      properties:
        version:
          type: string
      required:
      - version
      type: object
    TerraformVersionUsageVersionFieldsetsListingDocument:
      description: Document Listing.
      properties:
        data:
          items:
            $ref: '#/components/schemas/TerraformVersionUsageVersion'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    UsageStatistic:
      properties:
        attributes:
          properties:
            breakdown-id:
              description: The identifier of a resource by which the usage is broken down
              nullable: true
              type: string
            breakdown-name:
              description: The name of a resource by which the usage is broken down
              nullable: true
              type: string
            date:
              description: The date when usage has been recorded
              format: date
              nullable: true
              type: string
            runs-count:
              default: 0
              description: The count of runs finished within the date
              type: integer
            runs-seconds:
              default: 0
              description: The duration of runs in seconds within the date
              type: integer
          type: object
        id:
          readOnly: true
          type: string
        links:
          additionalProperties:
            type: string
          type: object
        relationships:
          properties:
            account:
              description: The account id usage is reported for
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - accounts
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - usage-statistics
          type: string
      required:
      - type
      type: object
    UsageStatisticListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/UsageStatistic'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    User:
      description: Represents a Scalr [IAM](https://docs.scalr.io/docs/identity-and-access-management) user.
      properties:
        attributes:
          properties:
            created-at:
              format: date-time
              nullable: true
              type: string
            email:
              maxLength: 255
              type: string
            full-name:
              maxLength: 100
              nullable: true
              type: string
            last-login-at:
              format: date-time
              nullable: true
              type: string
            status:
              enum:
              - Active
              - Inactive
              - Pending
              type: string
            username:
              maxLength: 255
              type: string
          required:
          - email
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            identity-providers:
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - identity-providers
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              required:
              - data
              type: object
            teams:
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - teams
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - users
          type: string
      required:
      - type
      - attributes
      type: object
    UserDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/User'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    UserInvite:
      description: Represents an create [IAM](https://docs.scalr.io/docs/identity-and-access-management) account user request.
      properties:
        attributes:
          properties:
            email:
              format: email
              type: string
            send-invite:
              default: true
              description: If set to `true`, email with invite to the account will be sent to the user email.
              type: boolean
          required:
          - email
          type: object
        id:
          readOnly: true
          type: string
        links:
          additionalProperties:
            type: string
          type: object
        relationships:
          properties:
            roles:
              description: Assign roles for this user on the account scope.
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - roles
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              required:
              - data
              type: object
            teams:
              description: Add user to the teams.
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - teams
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - users
          type: string
      required:
      - type
      - attributes
      type: object
    UserInviteDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/UserInvite'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    UserListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/User'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    Variable:
      description: |-
        A Variable describes the configuration and value of a variable in a workspace.

        In Scalr there are "terraform" and "environment" variables.

        * Terraform variables define values to be passed into the corresponding Terraform input variable
          that is defined in the Configuration Version to be used in a run. Scalr Terraform variables
          are added to the `terraform.tfvars.json` file in the working directory of the workspace prior to any run.
          The values passed in can be HCL structures if the `hcl` attribute is `true`.
        * Environment variables define shell variables that are added to the run time environment of a workspace
          using `export VAR=value`. These variables can pass authentication parameters to providers
          or any data required for local processing, such as via `local-exec` provisioners.
      properties:
        attributes:
          properties:
            category:
              description: |-
                * `terraform` - Values to be passed to terraform input variables of the same name.
                * `env` - shell environment variables. They will be injected via `export` during a terraform run.
              enum:
              - terraform
              - shell
              - env
              type: string
            description:
              description: Variable description.
              maxLength: 512
              nullable: true
              type: string
            final:
              default: false
              description: Indicates whether the variable can be overridden on a lower down the Scalr organizational model.
              type: boolean
            hcl:
              default: false
              description: |-
                Indicates whether the value of the variable is a string of HCL code.
                Not applicable to `env` category variables.
              type: boolean
            key:
              description: |-
                Variable name. Must correspond to the name of a Terraform input variable in the configuration
                if category is terraform.
              maxLength: 128
              type: string
            sensitive:
              default: false
              description: |-
                Indicates whether the value is sensitive. When set to `true` then the variable is not visible
                after being written.
              type: boolean
            updated-at:
              description: The variable last update timestamp.
              format: date-time
              nullable: true
              readOnly: true
              type: string
            updated-by-email:
              description: The email of the last user who updated this variable.
              nullable: true
              readOnly: true
              type: string
            value:
              default: ''
              description: 'Variable value. Not visible if sensitive: true is enabled'
              maxLength: 65535
              nullable: true
              type: string
          required:
          - category
          - key
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            account:
              description: The account this variable belongs to
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - accounts
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            environment:
              description: The environment this variable belongs to
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - environments
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            updated-by:
              description: The user who updated this variable last time.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - users
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            workspace:
              description: The workspace this variable belongs to.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - workspaces
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - vars
          type: string
      required:
      - type
      - attributes
      type: object
    VariableDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/Variable'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    VariableListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/Variable'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    VcsProvider:
      description: |-
        The VCS Provider resource represents a connection between a Scalr
        account and a VCS, such as GitHub, Gitlab, Bitbucket, and Azure DevOps.
      properties:
        attributes:
          properties:
            applies-enabled:
              default: false
              description: Indicates whether triggering apply runs from a PR comment is enabled for this VCS provider.
              type: boolean
            auth-type:
              description: |-
                Authentication type, the VCS API client is using to establish connection with the VCS.

                * `oauth2` - private OAuth App, user or organization creates in their VCS account.
                Setup through this method requires a user to complete a
                [web flow through a browser](/docs/github),
                where the user should authorize Scalr to connect to their OAuth App.

                * `personal_token` - a pre-generated authentication token. This method works better if
                  you need to fully automate the VCS provider creation.

                  How to generate access tokens for different VCS providers:
                  * [GitHub and GitHub Enterprise](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token)
                  * [GitLab and GitLab Enterprise](https://docs.gitlab.com/ce/user/profile/personal_access_tokens.html#creating-a-personal-access-token)
                  * [Azure DevOps](https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops-2019&tabs=preview-page)
                  * [Bitbucket Data Center](https://confluence.atlassian.com/bitbucketserver/personal-access-tokens-939515499.html)
              enum:
              - oauth2
              - personal_token
              type: string
            auto-merge:
              default: false
              description: Designates whether to automatically merge the base branch into the head before run execution.
              type: boolean
            checks-enabled:
              default: false
              description: Indicates whether checks are enabled for this VCS provider.
              type: boolean
            comments-enabled:
              default: false
              description: Indicates whether commenting on PRs is enabled for this VCS provider.
              type: boolean
            compare-strategy:
              default: base-commit
              description: Designates which commit is compared with the head commit to produce diff changes.
              enum:
              - base-commit
              - previous-commit
              type: string
            draft-pr-runs-enabled:
              default: false
              description: Indicates whether the draft pull-request runs are enabled for this VCS provider.
              type: boolean
            error-message:
              description: Contains error message, if the connection to VCS provider is broken.
              nullable: true
              readOnly: true
              type: string
            is-shared:
              description: Indicates whether the VCS provider can be used in any account environments or only linked one.
              type: boolean
            name:
              description: VCS provider name, which must be unique within the account.
              maxLength: 255
              minLength: 1
              pattern: ^[ A-Za-z0-9_-]+$
              type: string
            plans-enabled:
              default: false
              description: Indicates whether triggering dry runs from a PR comment is enabled for this VCS provider.
              type: boolean
            pr-merge-comments-enabled:
              default: false
              description: Indicates whether comment should be posted on PR after merge with results of triggered runs.
              type: boolean
            token:
              description: Access token for an API client for using to connect to the VCS Provider.
              nullable: true
              type: string
            url:
              description: |-
                The URL to the VCS provider installation.
                Required for GitHub Enterprise, GitLab Enterprise and Bitbucket Data Center.
              format: uri
              maxLength: 255
              minLength: 1
              nullable: true
              type: string
            username:
              description: Username for personal_token auth type. This field is required for bitbucket_enterprise provider.
              maxLength: 255
              nullable: true
              type: string
            vcs-type:
              description: VCS provider type.
              enum:
              - github
              - gitlab
              - bitbucket
              - bitbucket_enterprise
              - gitlab_enterprise
              - github_enterprise
              - azure_dev_ops_services
              type: string
          required:
          - name
          - vcs-type
          - auth-type
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            account:
              description: The account that owns this VCS integration.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - accounts
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            agent-pool:
              description: The ID of the agent pool to communicate with on-prem VCS provider that not accessible directly.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - agent-pools
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            environments:
              description: The list of environments this VCS integration is linked to.
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - environments
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - vcs-providers
          type: string
      required:
      - type
      - attributes
      type: object
    VcsProviderDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/VcsProvider'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    VcsProviderListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/VcsProvider'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    VcsRevision:
      description: Resource represents a VCS revision attributes.
      properties:
        attributes:
          properties:
            branch:
              maxLength: 255
              nullable: true
              type: string
            clone-url:
              type: string
            commit-message:
              nullable: true
              type: string
            commit-sha:
              maxLength: 40
              nullable: true
              type: string
            commit-url:
              nullable: true
              type: string
            repository-id:
              maxLength: 255
              type: string
            sender-username:
              maxLength: 255
              nullable: true
              type: string
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              type: string
          readOnly: true
          type: object
        type:
          enum:
          - vcs-revisions
          type: string
      required:
      - type
      type: object
    VcsRevisionDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/VcsRevision'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    VcsTaskRequest:
      description: Represents a request for creating a VCS task.
      properties:
        branch:
          maxLength: 255
          minLength: 1
          type: string
        commit-sha:
          maxLength: 40
          minLength: 1
          type: string
        repository-id:
          maxLength: 255
          minLength: 1
          type: string
      required:
      - repository-id
      - branch
      - commit-sha
      type: object
    WebhookIntegration:
      description: |-
        Represents the webhook integration

        The extra fields below are not available in response by default. Ask for them explicitly in the query parameter `fields[webhook-integrations]`:
        * statistics
      properties:
        attributes:
          properties:
            enabled:
              description: Webhook can be turned off by setting to `false`.
              type: boolean
            headers:
              items:
                properties:
                  name:
                    description: A header name.
                    type: string
                  sensitive:
                    default: false
                    description: Whether the value is a sensitive.
                    type: boolean
                  value:
                    description: A header value. Not visible if sensitive.
                    nullable: true
                    type: string
                required:
                - name
                - value
                type: object
              nullable: true
              type: array
            http-method:
              default: POST
              readOnly: true
              type: string
            is-shared:
              description: Indicates whether the webhook is available in any environment of the account without directly linking
                it.
              type: boolean
            last-triggered-at:
              description: The Date/Time of the last notification.
              format: date-time
              nullable: true
              readOnly: true
              type: string
            max-attempts:
              default: 3
              description: The number of retry attempts.
              type: integer
            name:
              description: The name of the webhook. Use your target application/component name for better discoverability.
              maxLength: 255
              type: string
            secret-key:
              description: The secret passphrase for HMAC signature.
              maxLength: 1024
              type: string
            statistics:
              description: 'Webhook delivery statistics (delivered, failed and total) by periods: last hour, last day and
                last week'
              nullable: true
              properties:
                last-day:
                  properties:
                    delivered:
                      default: 0
                      type: integer
                    failed:
                      default: 0
                      type: integer
                    total:
                      default: 0
                      type: integer
                  type: object
                last-hour:
                  properties:
                    delivered:
                      default: 0
                      type: integer
                    failed:
                      default: 0
                      type: integer
                    total:
                      default: 0
                      type: integer
                  type: object
                last-week:
                  properties:
                    delivered:
                      default: 0
                      type: integer
                    failed:
                      default: 0
                      type: integer
                    total:
                      default: 0
                      type: integer
                  type: object
              readOnly: true
              type: object
            timeout:
              default: 15
              description: The HTTP transaction timeout.
              type: integer
            url:
              description: HTTP(s) destination URL.
              maxLength: 2048
              type: string
          required:
          - name
          - url
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            account:
              description: The account this webhook belongs to.
              properties:
                data:
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - accounts
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            environments:
              description: The list of environments this webhook is linked to.
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - environments
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              required:
              - data
              type: object
            events:
              description: |-
                The list of events this webhook will be notified about.
                Use [List Event Definitions](/docs/webhooks) to obtain the list
                of all available events.
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - event-definitions
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              required:
              - data
              type: object
          required:
          - account
          type: object
        type:
          enum:
          - webhook-integrations
          type: string
      required:
      - type
      - attributes
      - relationships
      type: object
    WebhookIntegrationDelivery:
      description: Represents an IaCP Webhook integration delivery.
      properties:
        attributes:
          properties:
            attempts:
              description: The number of attempts made to deliver the webhook.
              type: integer
            error-message:
              description: The error message, if any, encountered during delivery.
              nullable: true
              type: string
            last-handle-attempt-at:
              description: The Date/Time of the last attempt to deliver the webhook.
              format: date-time
              type: string
            request-body:
              description: The data payload (JSON format) sent in the webhook request body.
              type: object
            request-headers:
              description: The HTTP request headers sent with the webhook.
              type: object
            response-body:
              anyOf:
              - type: object
              - type: string
              description: The data (JSON or plain text) received in the response body from the external system.
              nullable: true
            response-code:
              description: The HTTP status code returned by the external system.
              nullable: true
              type: integer
            response-headers:
              description: The HTTP response headers received from the external system.
              nullable: true
              type: object
            status:
              description: 'The delivery status. Can be: `pending`, `completed`, or `failed`.'
              type: string
            triggered-at:
              description: The Date/Time when the webhook was triggered.
              format: date-time
              type: string
          required:
          - status
          type: object
        id:
          readOnly: true
          type: string
        links:
          additionalProperties:
            type: string
          type: object
        relationships:
          properties:
            environment:
              description: The environment related to the webhook delivery.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - environments
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            event:
              description: The specific event that triggered this webhook delivery.
              properties:
                data:
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - event-definitions
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            run:
              description: The optional run associated with the webhook delivery.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - runs
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            triggered-by:
              description: The user who triggered the webhook.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - users
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            webhook:
              description: The webhook this delivery belongs to.
              properties:
                data:
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - webhook-integrations
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            workspace:
              description: The workspace related to the webhook delivery.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - workspaces
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
          required:
          - webhook
          - event
          type: object
        type:
          enum:
          - webhook-integration-deliveries
          type: string
      required:
      - type
      - attributes
      - relationships
      type: object
    WebhookIntegrationDeliveryDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/WebhookIntegrationDelivery'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    WebhookIntegrationDeliveryListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/WebhookIntegrationDelivery'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    WebhookIntegrationDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/WebhookIntegration'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    WebhookIntegrationListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/WebhookIntegration'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    WorkloadIdentityProvider:
      description: External OpenID Connect 1.0 compliant identity provider.
      properties:
        attributes:
          properties:
            allowed-audiences:
              description: A list of audiences allowed for the IdP tokens.
              items:
                type: string
              type: array
            created-at:
              description: The UTC datetime at which the workload identity provider was created.
              format: date-time
              readOnly: true
              type: string
            created-by-email:
              description: Email of the user who created workload identity provider.
              nullable: true
              readOnly: true
              type: string
            name:
              description: The name of the workload identity provider.
              maxLength: 255
              type: string
            status:
              default: pending
              description: The status of the workload identity provider.
              enum:
              - pending
              - active
              - invalid_provider_settings
              - fetch_jwks_error
              - not_supported_jwks
              - internal_error
              readOnly: true
              type: string
            url:
              description: The publicly available URL of the IdP (must start with "https://", not include a port number and
                not end with a trailing slash).
              maxLength: 255
              type: string
          required:
          - name
          - url
          - allowed-audiences
          type: object
        id:
          readOnly: true
          type: string
        links:
          additionalProperties:
            type: string
          type: object
        relationships:
          properties:
            assume-service-account-policies:
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - assume-service-account-policies
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              readOnly: true
              required:
              - data
              type: object
          type: object
        type:
          enum:
          - workload-identity-providers
          type: string
      required:
      - type
      - attributes
      type: object
    WorkloadIdentityProviderDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/WorkloadIdentityProvider'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    WorkloadIdentityProviderListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/WorkloadIdentityProvider'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    Workspace:
      description: |-
        A Workspace is where Terraform runs are performed for a specific configuration, and where the resulting
        state file(s) are stored.

        Workspaces belong to environments and can have `variables` configured to provide inputs to the configuration,
        authenticate providers etc.

        The extra fields below are not available in response by default. Ask for them explicitly in the query parameter `fields[workspaces]`:
        * module
      properties:
        attributes:
          properties:
            apply-schedule:
              description: Cron expression for scheduled runs. Time should be in UTC.
              nullable: true
              readOnly: true
              type: string
            auto-apply:
              description: |-
                Indicates whether `terraform apply` should automatically run
                when terraform plan ends without error. Default `false`.
              type: boolean
            auto-destroy-days:
              description: How many days should the workspace exist.
              enum:
              - 1
              - 2
              - 7
              - 14
              nullable: true
              type: integer
            auto-destroy-status:
              description: The status of scheduled destruction of the workspace.
              nullable: true
              readOnly: true
              type: string
            auto-destroy-time:
              description: When should the destruction of the workspace begin.
              format: date-time
              nullable: true
              readOnly: true
              type: string
            auto-queue-runs:
              default: skip_first
              description: |-
                Indicates if runs have to be queued automatically when a new configuration version is uploaded.
                `skip_first` - after the very first configuration version is uploaded into the workspace the run will not be triggered.
                    But the following configurations will do. This is the default behavior.
                `on_create_only` - single run will be triggered only when the workspace is created and the first configuration version is uploaded.
                    Subsequent configurations will not trigger runs.
                `always` - runs will be triggered automatically on every upload of the configuration version.
                `never` - configuration versions are uploaded into the workspace, but runs will not be triggered.
              enum:
              - always
              - never
              - skip_first
              - on_create_only
              type: string
            created-at:
              description: The resource creation timestamp.
              format: date-time
              readOnly: true
              type: string
            deletion-protection-changed-by-email:
              description: The email of a user who toggled deletion protection.
              nullable: true
              readOnly: true
              type: string
            deletion-protection-enabled:
              description: Designates whether deletion protection is enabled.
              type: boolean
            destroy-schedule:
              description: Cron expression for scheduled destroy runs. Time should be in UTC.
              nullable: true
              readOnly: true
              type: string
            environment-type:
              description: The type of the Scalr Workspace environment.
              enum:
              - production
              - staging
              - testing
              - development
              - unmapped
              type: string
            execution-mode:
              default: remote
              description: |-
                Which execution mode to use. Valid values are `remote` and `local`.
                When set to `local`, the workspace will be used for state storage only.
              enum:
              - remote
              - local
              type: string
            favorite:
              description: Indicates whether the workspace is marked as favorite by the current user.
              readOnly: true
              type: boolean
            force-latest-run:
              description: |-
                Indicates whether `force run` should automatically apply to latest run.
                Default `false`.
              type: boolean
            has-resources:
              description: Indicates whether the workspace's current state version contains terraform resources.
              readOnly: true
              type: boolean
            hooks:
              nullable: true
              properties:
                post-apply:
                  description: Command that should be run after terraform apply operation executed.
                  nullable: true
                  type: string
                post-plan:
                  description: Command that should be run after terraform plan operation executed.
                  nullable: true
                  type: string
                pre-apply:
                  description: Command that should be run before terraform apply operation executed.
                  nullable: true
                  type: string
                pre-init:
                  description: Command that should be run before terraform init operation executed.
                  nullable: true
                  type: string
                pre-plan:
                  description: Command that should be run before terraform plan operation executed.
                  nullable: true
                  type: string
              type: object
            iac-platform:
              default: terraform
              description: The IaC platform of this workspace.
              enum:
              - terraform
              - opentofu
              type: string
            lock-reason:
              description: The reason (if any) that the workspace has been locked.
              nullable: true
              readOnly: true
              type: string
            locked:
              description: |-
                Indicates whether the workspace is locked for operations. The `lock-reason` attribute
                carries the explanation.

                This semaphore is acquired and released by terraform apply and can also manage it with
                Lock/Unlock Workspace.

                Default: `false`
              readOnly: true
              type: boolean
            name:
              description: |-
                Workspace name which must be unique within the environment.

                Comprises letters, numbers, `-`, and `_` only.
              maxLength: 255
              type: string
            operations:
              deprecated: true
              description: The attribute `operations` is deprecated. Use `execution-mode` instead.
              type: boolean
            permissions:
              readOnly: true
              type: object
            remote-backend:
              description: Manages if Scalr exports the remote backend configuration and state storage for your infrastructure
                management. Disabling this feature will also prevent the ability to perform state locking, which ensures that
                concurrent operations do not conflict. Additionally, it will disable the capability to initiate CLI-driven
                runs through Scalr.
              type: boolean
            remote-state-sharing:
              description: Specifies if the state is shared within the environment.
              type: boolean
            run-operation-timeout:
              description: The timeout for the Terraform Run operations (in minutes).
              nullable: true
              type: integer
            terraform-version:
              description: The version of Terraform the workspace performs runs on. If omitted, the system default version
                is assigned.
              type: string
            terragrunt:
              nullable: true
              properties:
                include-external-dependencies:
                  default: false
                  description: Indicates whether the workspace includes external dependencies.
                  type: boolean
                use-run-all:
                  default: false
                  description: Indicates whether the workspace uses `terragrunt run-all`.
                  type: boolean
                version:
                  description: The version of Terragrunt the workspace performs runs on.
                  type: string
              required:
              - version
              type: object
            updated-at:
              description: The resource last update timestamp.
              format: date-time
              nullable: true
              readOnly: true
              type: string
            updated-by-email:
              description: The email of the last user, that updated this workspace.
              nullable: true
              readOnly: true
              type: string
            var-files:
              default: []
              description: The list of Terraform variables files.
              items:
                type: string
              nullable: true
              type: array
            vcs-repo:
              nullable: true
              properties:
                branch:
                  description: |-
                    Branch of a repository the workspace is associated with.
                    If omitted, the repository default branch will be used.

                    This option conflicts with `version_constraint`.
                  nullable: true
                  type: string
                dry-runs-enabled:
                  default: true
                  description: |-
                    When true once a pull request into the vcs-repo.branch is opened, every push
                    to a pull request's branch will trigger a dry run in the workspace. Default `true`
                  type: boolean
                identifier:
                  description: |-
                    A reference to your VCS repository.

                    For GitHub, GitHub Enterprise and GitLab the format is `<org>/<repo>`.
                    Azure DevOps Services has the format `<org>/<project>/<repo>`.
                  type: string
                ingress-submodules:
                  default: false
                  description: Specifies whether git submodules should be fetched when cloning the VCS repository.
                  type: boolean
                path:
                  default: ''
                  deprecated: true
                  description: The attribute `vcs-repo.path` is deprecated. Use working-directory and trigger-prefixes instead.
                  nullable: true
                  type: string
                trigger-patterns:
                  description: |-
                    List of path patterns in gitignore format, whose changes will trigger a run for the
                    workspace using this binding when the CV is created.
                    Conflicts with 'trigger-prefixes'.
                    If 'trigger-patterns' and 'trigger-prefixes' are omitted, any change in the configuration version root will trigger a new run.
                  nullable: true
                  type: string
                trigger-prefixes:
                  default: []
                  description: |-
                    List of paths (relative to the configuration version root), whose changes will trigger a run for the
                    workspace using this binding when the CV is created.
                    Conflicts with 'trigger-patterns'.
                    If 'trigger-patterns' and 'trigger-prefixes' are omitted, any change in the configuration version root will trigger a new run.
                  items:
                    type: string
                  nullable: true
                  type: array
                version-constraint:
                  description: |-
                    Terraform-like version constraint used to trigger a run for matching Git tags.

                    Only stable tags are supported in version ranges. Pre-release tags
                    (e.g. `-rc`, `-beta`) must be specified exactly, e.g. `1.2.0-rc1`,
                    to trigger a run.

                    This option conflicts with `branch`.
                  nullable: true
                  type: string
              required:
              - identifier
              type: object
            working-directory:
              description: A relative path where Terraform commands will execute in.
              maxLength: 255
              nullable: true
              type: string
          required:
          - name
          type: object
        id:
          readOnly: true
          type: string
        links:
          properties:
            self:
              readOnly: true
              type: string
          readOnly: true
          type: object
        relationships:
          properties:
            agent-pool:
              description: The ID of the agent pool used to execute run stages. Overrides the default account-level and environment-level
                pools.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - agent-pools
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            configuration-version:
              description: The latest uploaded configuration version.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - configuration-versions
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            created-by:
              description: The user, who has triggered the run.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - users
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            current-run:
              description: The latest non-dry Run in this workspace.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - runs
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            drift-report:
              description: The drift report for the workspace.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - drift-reports
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            environment:
              description: The environment this workspace belongs to.
              properties:
                data:
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - environments
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            latest-configuration-version:
              description: The configuration version of the latest non-dry Run in this workspace.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - configuration-versions
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            latest-run:
              deprecated: true
              description: The latest non-dry Run in this workspace (deprecated, same as current).
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - runs
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            locked-by:
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - users
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            locked-by-run:
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - runs
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            module:
              description: The ID of the module.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - modules
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            module-version:
              description: The ID of the module version.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - module-versions
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
            readme-id:
              description: The readme for the workspace.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - workspace-readme
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            ssh-key:
              description: The SSH key used to this workspace.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - account-ssh-keys
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            tags:
              properties:
                data:
                  items:
                    properties:
                      id:
                        type: string
                      type:
                        enum:
                        - tags
                        type: string
                    required:
                    - type
                    - id
                    type: object
                  nullable: true
                  type: array
              required:
              - data
              type: object
            updated-by:
              description: The last user, that updated this workspace.
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - users
                      type: string
                  required:
                  - type
                  - id
                  type: object
              readOnly: true
              required:
              - data
              type: object
            vcs-provider:
              description: VCS provider of the Run's workspace
              properties:
                data:
                  nullable: true
                  properties:
                    id:
                      type: string
                    type:
                      enum:
                      - vcs-providers
                      type: string
                  required:
                  - type
                  - id
                  type: object
              required:
              - data
              type: object
          required:
          - environment
          type: object
        type:
          enum:
          - workspaces
          type: string
      required:
      - type
      - attributes
      - relationships
      type: object
    WorkspaceDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/Workspace'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    WorkspaceListingDocument:
      description: |-
        JSON:API Document Listing

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          items:
            $ref: '#/components/schemas/Workspace'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    WorkspaceOutput:
      description: Represents a run output.
      properties:
        name:
          description: The name of the output.
          type: string
        sensitive:
          description: Whether the value of the output is sensitive.
          type: boolean
        value:
          description: The value of the output.
          nullable: true
      type: object
    WorkspaceOutputFieldsetsListingDocument:
      description: Document Listing.
      properties:
        data:
          items:
            $ref: '#/components/schemas/WorkspaceOutput'
          type: array
        included:
          items:
            type: object
          readOnly: true
          type: array
        links:
          additionalProperties:
            type: string
          readOnly: true
          type: object
        meta:
          readOnly: true
          type: object
      type: object
    WorkspaceReadme:
      description: A WorkspaceReadme resource represents the readme file for a workspace.
      properties:
        attributes:
          properties:
            content:
              description: The content of the readme file.
              type: string
            created-at:
              description: The time when the readme record was created.
              format: date-time
              type: string
          type: object
        id:
          readOnly: true
          type: string
        links:
          additionalProperties:
            type: string
          type: object
        type:
          enum:
          - workspace-readme
          type: string
      required:
      - type
      type: object
    WorkspaceReadmeDocument:
      description: |-
        JSON:API Document.

        see: https://jsonapi.org/format/#document-structure
      properties:
        data:
          $ref: '#/components/schemas/WorkspaceReadme'
        included:
          items:
            type: object
          readOnly: true
          type: array
        meta:
          readOnly: true
          type: object
      type: object
    WorkspaceSSHKeyLinkRequest:
      properties:
        ssh-key:
          description: The reference to the SSH key that is linked to the workspace.
          type: string
      required:
      - ssh-key
      type: object
    WorkspaceSchedule:
      properties:
        apply-schedule:
          nullable: true
          type: string
        destroy-schedule:
          nullable: true
          type: string
      type: object
  securitySchemes:
    API-Key:
      scheme: bearer
      type: http
info:
  description: Scalr IACP API
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  title: Scalr IACP API
  version: unversioned
openapi: 3.0.0
paths:
  /access-policies:
    get:
      description: |
        This endpoint returns a list of [IAM](https://docs.scalr.io/docs/identity-and-access-management) access policies.
      operationId: get_access_policies
      parameters:
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: Account filter
        in: query
        name: filter[account]
        required: false
        schema:
          type: string
      - description: Access Policy filter.
        in: query
        name: filter[access-policy]
        required: false
        schema:
          type: string
      - description: Environment filter
        in: query
        name: filter[environment]
        required: false
        schema:
          type: string
      - description: Workspace filter
        in: query
        name: filter[workspace]
        required: false
        schema:
          type: string
      - description: User filter
        in: query
        name: filter[user]
        required: false
        schema:
          type: string
      - description: Team filter
        in: query
        name: filter[team]
        required: false
        schema:
          type: string
      - description: Service account filter
        in: query
        name: filter[service-account]
        required: false
        schema:
          type: string
      - description: Role filter
        in: query
        name: filter[role]
        required: false
        schema:
          type: string
      - description: Conditions filter
        in: query
        name: filter[conditions]
        required: false
        schema:
          enum:
          - none
          - environment
          - workspace
          type: string
      - description: Query string
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - account
            - environment
            - service-account
            - team
            - user
            - workspace
            type: string
          type: array
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - account
            - environment
            - roles
            - service-account
            - team
            - user
            - workspace
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AccessPolicyListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Access Policies
      tags:
      - access-policies
      x-mcp-tool: true
      x-resource: AccessPolicy
      x-service: tf-api
    post:
      description: |
        Grant access for a member identity to a scope identity.

        Access is a set of `roles`. Member identity might be one of `user`, `team`, or `service-account`.
        Scope identity is one of `account`, `environment`, or `workspace`.

        Check out [identity and access management](https://docs.scalr.io/docs/identity-and-access-management) for a detailed
        description of the Scalr IAM model.
      operationId: create_access_policy
      parameters:
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - account
            - environment
            - roles
            - service-account
            - team
            - user
            - workspace
            type: string
          type: array
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/create-access-policy-request.yml
            schema:
              $ref: '#/components/schemas/AccessPolicyDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/create-access-policy-response.yml
              schema:
                $ref: '#/components/schemas/AccessPolicyDocument'
          description: Successfully created.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Relationship not found or user unauthorized to read it.
        '409':
          description: Quota exceeded error.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.)
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create an Access Policy
      tags:
      - access-policies
      x-resource: AccessPolicy
      x-service: tf-api
  /access-policies/{access_policy}:
    delete:
      operationId: delete_access_policy
      parameters:
      - description: The ID of the access policy to delete.
        in: path
        name: access_policy
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Access policy deleted.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Access policy not found.
        '422':
          description: Attempt to delete a system role.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete Access Policy
      tags:
      - access-policies
      x-resource: AccessPolicy
      x-service: tf-api
    get:
      description: The endpoint returns [IAM](https://docs.scalr.io/docs/identity-and-access-management) access policy by
        ID.
      operationId: get_access_policy
      parameters:
      - description: The ID of the access policy.
        in: path
        name: access_policy
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - account
            - environment
            - roles
            - service-account
            - team
            - user
            - workspace
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AccessPolicyDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Access policy not found.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get an Access Policy
      tags:
      - access-policies
      x-mcp-tool: true
      x-resource: AccessPolicy
      x-service: tf-api
    patch:
      operationId: update_access_policy
      parameters:
      - description: The ID of the access policy to update.
        in: path
        name: access_policy
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - account
            - environment
            - roles
            - service-account
            - team
            - user
            - workspace
            type: string
          type: array
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/AccessPolicyDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AccessPolicyDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Access policy not found.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.)
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update an Access Policy
      tags:
      - access-policies
      x-resource: AccessPolicy
      x-service: tf-api
  /access-tokens:
    get:
      description: This endpoint lists user access tokens.
      operationId: list_access_tokens
      parameters:
      - description: Returns tokens by expiration status
        in: query
        name: filter[is-expired]
        required: false
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - created-at
            - description
            - expires-at
            - last-used-at
            - name
            type: string
          type: array
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - created-by
            type: string
          type: array
      - description: Query string
        in: query
        name: query
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AccessTokenListingDocument'
          description: Success.
        '404':
          description: User not authorized.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List access tokens
      tags:
      - access-tokens
      x-resource: AccessToken
      x-service: tf-api
    post:
      description: This endpoint creates access token.
      operationId: create_access_token
      parameters:
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - created-by
            type: string
          type: array
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/AccessTokenDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AccessTokenDocument'
          description: Successfully created.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create an Access Token
      tags:
      - access-tokens
      x-resource: AccessToken
      x-service: tf-api
  /access-tokens/{access_token}:
    delete:
      description: |
        Delete an access token by ID.
      operationId: delete_access_token
      parameters:
      - description: The ID of the access token to be deleted.
        in: path
        name: access_token
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Deleted.
        '404':
          description: Object not found or user unauthorized.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete an Access Token
      tags:
      - access-tokens
      x-resource: AccessToken
      x-service: tf-api
    get:
      description: Get an access token by ID.
      operationId: get_access_token
      parameters:
      - description: The ID of the access token to get.
        in: path
        name: access_token
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - created-by
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AccessTokenDocument'
          description: Success.
        '404':
          description: Object not found or user unauthorized.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get an Access Token
      tags:
      - access-tokens
      x-resource: AccessToken
      x-service: tf-api
    patch:
      description: |
        Update an access token by ID.
      operationId: update_access_token
      parameters:
      - description: The ID of the access token to be updated.
        in: path
        name: access_token
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - created-by
            type: string
          type: array
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/AccessTokenDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AccessTokenDocument'
          description: Successfully updated.
        '404':
          description: Object not found or user unauthorized.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update an Access Token
      tags:
      - access-tokens
      x-resource: AccessToken
      x-service: tf-api
  /account-users:
    get:
      description: |
        This endpoint returns a list of `AccountUser` resources.

        To get the list of accounts the user has access to, the `filter[user]` has to be specified.
        To get the list of users that have access to an account the `filter[account]` has to be specified.
      operationId: get_account_users
      parameters:
      - description: The account filter.
        in: query
        name: filter[account]
        required: false
        schema:
          type: string
      - description: The user filter.
        in: query
        name: filter[user]
        required: false
        schema:
          type: string
      - description: The Team filter.
        in: query
        name: filter[team]
        required: false
        schema:
          type: string
      - description: The AccountUser status filter.
        in: query
        name: filter[status]
        required: false
        schema:
          type: string
      - description: List only users who have admin role on the account.
        in: query
        name: filter[is-admin]
        required: false
        schema:
          type: string
      - description: Query string
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - created-at
            - email
            - full-name
            - last-login-at
            - status
            type: string
          type: array
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - account
            - teams
            - user
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/list-account-users.yml
              schema:
                $ref: '#/components/schemas/AccountUserListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Account to User relationships
      tags:
      - accounts-users
      x-resource: User
      x-service: tf-api
  /accounts:
    get:
      operationId: get_accounts
      parameters:
      - description: The account name filter.
        in: query
        name: filter[name]
        required: false
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - billing-plan
            - identity-provider
            - owner
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            accounts:
              description: The comma-separated list of fields to return in response for Account resource.
              type: string
            billing-plans:
              description: The comma-separated list of fields to return in response for BillingPlan resource.
              type: string
            identity-providers:
              description: The comma-separated list of fields to return in response for IdentityProvider resource.
              type: string
            users:
              description: The comma-separated list of fields to return in response for User resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AccountListingDocument'
          description: Success.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Accounts
      tags:
      - accounts
      x-resource: Account
      x-service: tf-api
  /accounts/{account}:
    get:
      description: Show details of a specific account.
      operationId: get_account
      parameters:
      - description: The ID of the account.
        in: path
        name: account
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - billing-plan
            - identity-provider
            - owner
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AccountDocument'
          description: Success.
        '404':
          description: Account not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get an Account
      tags:
      - accounts
      x-mcp-tool: true
      x-resource: Account
      x-service: tf-api
    patch:
      operationId: update_account
      parameters:
      - description: The ID of the account to update.
        in: path
        name: account
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/AccountDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AccountDocument'
          description: Successfully updated the account.
        '404':
          description: Account or relationship not found, or user unauthorized to perform action.
        '422':
          description: Invalid arguments.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update Account
      tags:
      - accounts
      x-resource: Account
      x-service: tf-api
  /accounts/{account}/actions/invite:
    post:
      description: |
        Invite the user to the account by adding it to the account teams and/or
        creating access policies within the account.

        If the user with a specified email does not exist - a new one will be created.
        The new user will be in the 'pending' status until the first login to the account.

        This is the preferred way to create users.
      operationId: invite_user_to_account
      parameters:
      - in: path
        name: account
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - account
            - teams
            - user
            type: string
          type: array
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/invite-user-to-account-request.yml
            schema:
              $ref: '#/components/schemas/UserInviteDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/invite-user-to-account-response.yml
              schema:
                $ref: '#/components/schemas/AccountUserDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: User, Account, not found.
        '422':
          description: Invalid team or role.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Invite a User to the Account
      tags:
      - users
      x-resource: User
      x-service: tf-api
  /accounts/{account}/actions/remove/{user}:
    delete:
      description: |
        Removes a user from the account. This revokes all access policies
        and team memberships associated with the account for that user.
      operationId: remove_user_from_account
      parameters:
      - description: The ID of the account.
        in: path
        name: account
        required: true
        schema:
          type: string
      - description: |
          The ID of the user.
        in: path
        name: user
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Successfully removed.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: The user or account not found.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Remove a User from the Account
      tags:
      - users
      x-resource: User
      x-service: tf-api
  /accounts/{account}/metrics:
    get:
      operationId: get_metrics
      parameters:
      - description: |
          The ID of the account
        in: path
        name: account
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountMetrics'
          description: Success.
        '404':
          description: Account or relationship not found, or user unauthorized to perform an action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Shows Account Metrics
      tags:
      - accounts
      x-resource: Account
      x-service: tf-api
  /accounts/{account}/relationships/sso-bypass-users:
    delete:
      description: |
        This endpoint removes given [users](users.html#the-user-resource) from the list of those
        who can log in to the account via password, even when SSO is enforced.
      operationId: delete_sso_bypass_users
      parameters:
      - description: |
          The ID of the account.
        in: path
        name: account
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/add-sso-bypass-users-request.yml
            schema:
              $ref: '#/components/schemas/SsoBypassUsersRelationshipFieldsetsListingDocument'
      responses:
        '204':
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete SSO bypass users of the account
      tags:
      - accounts
      x-resource: Account
      x-service: tf-api
    get:
      description: |
        This endpoint returns a list of [users](users.html#the-user-resource)
        who can log in to the account via password, even when SSO is enforced.
      operationId: list_sso_bypass_users
      parameters:
      - description: |
          The ID of the account.
        in: path
        name: account
        required: true
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/list-sso-bypass-users-response.yml
              schema:
                $ref: '#/components/schemas/SsoBypassUsersRelationshipFieldsetsListingDocument'
          description: Request was successful.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Account not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List SSO bypass users of the account
      tags:
      - accounts
      x-mcp-tool: true
      x-resource: Account
      x-service: tf-api
    patch:
      description: |
        This endpoint completely replaces the list of [users](users.html#the-user-resource)
        who can log in to the account via password, even when SSO is enforced,
        with a provided list.
      operationId: replace_sso_bypass_users
      parameters:
      - description: |
          The ID of the account.
        in: path
        name: account
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/add-sso-bypass-users-request.yml
              empty:
                $ref: examples/replace-sso-bypass-users-empty-request.yml
            schema:
              $ref: '#/components/schemas/SsoBypassUsersRelationshipFieldsetsListingDocument'
      responses:
        '204':
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Replace SSO bypass users of the account
      tags:
      - accounts
      x-resource: Account
      x-service: tf-api
    post:
      description: |
        This endpoint adds provided [users](users.html#the-user-resource) to those
        who can log in to the account via password, even when SSO is enforced.
      operationId: add_sso_bypass_users
      parameters:
      - description: |
          The ID of the account.
        in: path
        name: account
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/add-sso-bypass-users-request.yml
            schema:
              $ref: '#/components/schemas/SsoBypassUsersRelationshipFieldsetsListingDocument'
      responses:
        '204':
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Add SSO bypass users to the account
      tags:
      - accounts
      x-resource: Account
      x-service: tf-api
  /agent-pools:
    get:
      description: |
        This endpoint returns a list of [agent pools](/docs/agent-pools)
        by various filters.
      operationId: get_agent_pools
      parameters:
      - description: The id of the agent pool.
        in: query
        name: filter[agent-pool]
        required: false
        schema:
          type: string
      - description: The agent pool name.
        in: query
        name: filter[name]
        required: false
        schema:
          type: string
      - description: Is the agent pool VCS support enabled.
        in: query
        name: filter[vcs-enabled]
        required: false
        schema:
          type: string
      - description: Is the agent pool is used by any workspace.
        in: query
        name: filter[in-use]
        required: false
        schema:
          type: string
      - description: Is the agent pool shared with all environments.
        in: query
        name: filter[is-shared]
        required: false
        schema:
          type: string
      - description: The account filter.
        in: query
        name: filter[account]
        required: false
        schema:
          type: string
      - description: The environment filter.
        in: query
        name: filter[environment]
        required: false
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - account
            - agents
            - environment
            - environments
            - workspaces
            type: string
          type: array
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - account
            - environment
            - in-use
            - name
            - vcs-enabled
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AgentPoolListingDocument'
          description: Success.
        '404':
          description: User not authorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Agent Pools
      tags:
      - agent-pools
      x-resource: AgentPool
      x-service: tf-api
    post:
      description: |
        Create a new [agent pool](/docs/agent-pools) resource.

        Agent pools can be created at the `account` or `environment` scope. The scope must be
        defined as part of the agent pool creation. If a pool is created at the account scope,
        all environments and workspaces within those environments will have access to use the pool.
        If a pool is created at the environment scope, then only the workspaces in that environment
        can use that pool.

        The typical flow for configuring a new agent pool involves the following operations:
        * Create an agent pool
        * [Create an access token](create_agent_pool_token) for the
        pool. The pool token is needed by an agent in order to join the agent pool. During the
        agent<->server handshake phase, the API server will generate a unique session token for
        each agent which will be used for all communication with the API server.
        * Install/Configure an agent on the customer's network.
      operationId: create_agent_pool
      parameters:
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - account
            - agents
            - environment
            - environments
            - workspaces
            type: string
          type: array
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/create-agent-pool-request.yml
            schema:
              $ref: '#/components/schemas/AgentPoolDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/create-agent-pool-response.yml
              schema:
                $ref: '#/components/schemas/AgentPoolDocument'
          description: Successfully created.
        '403':
          description: User unauthorized to perform this action.
        '409':
          description: Quota exceeded error.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create an Agent Pool
      tags:
      - agent-pools
      x-resource: AgentPool
      x-service: tf-api
  /agent-pools/{agent_pool}:
    delete:
      description: |
        This endpoint deletes an [agent pool](/docs/agent-pools) by ID.
      operationId: delete_agent_pool
      parameters:
      - description: The ID of the agent pool to be deleted.
        in: path
        name: agent_pool
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Successfully deleted.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Agent pool not found or user unauthorized.
        '409':
          description: Can't be deleted. Has busy agents.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete an Agent Pool
      tags:
      - agent-pools
      x-resource: AgentPool
      x-service: tf-api
    get:
      description: |
        Show details of a specific [agent pool](/docs/agent-pools).
      operationId: get_agent_pool
      parameters:
      - description: The ID of the agent pool to show.
        in: path
        name: agent_pool
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - account
            - agents
            - environment
            - environments
            - workspaces
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AgentPoolDocument'
          description: Success.
        '404':
          description: User not authorized or agent pool not found.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get an Agent Pool
      tags:
      - agent-pools
      x-resource: AgentPool
      x-service: tf-api
    patch:
      description: |
        This endpoint updates an [agent pool](/docs/agent-pools) by ID.
      operationId: update_agent_pool
      parameters:
      - description: The ID of the agent pool to be updated.
        in: path
        name: agent_pool
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - account
            - agents
            - environment
            - environments
            - workspaces
            type: string
          type: array
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/update-agent-pool-bulk-link-request.yml
            schema:
              $ref: '#/components/schemas/AgentPoolDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AgentPoolDocument'
          description: Successfully updated.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: User not authorized or agent pool not found.
        '409':
          description: Quota exceeded error.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update an Agent Pool
      tags:
      - agent-pools
      x-resource: AgentPool
      x-service: tf-api
  /agent-pools/{agent_pool}/access-tokens:
    get:
      operationId: list_agent_pool_access_tokens
      parameters:
      - description: The ID of the agent pool to list access tokens for.
        in: path
        name: agent_pool
        required: true
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - created-at
            - description
            - expires-at
            - last-used-at
            - name
            type: string
          type: array
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - created-by
            type: string
          type: array
      - description: Query string
        in: query
        name: query
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AccessTokenListingDocument'
          description: Success.
        '404':
          description: Object not found or user unauthorized.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Agent Pool Access Tokens
      tags:
      - access-tokens
      x-resource: AccessToken
      x-service: tf-api
    post:
      description: |
        This endpoint creates agent pool's access token.
      operationId: create_agent_pool_token
      parameters:
      - description: The ID of the agent pool to create a token for.
        in: path
        name: agent_pool
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - created-by
            type: string
          type: array
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/create-agent-pool-token-request.yml
            schema:
              $ref: '#/components/schemas/AccessTokenDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/create-agent-pool-token-response.yml
              schema:
                $ref: '#/components/schemas/AccessTokenDocument'
          description: Successfully created.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create an Agent Pool Access Token
      tags:
      - access-tokens
      x-resource: AccessToken
      x-service: tf-api
  /agents:
    get:
      description: |
        The endpoint returns a list of agents by various filters.
      operationId: get_agents
      parameters:
      - description: The agent identifier.
        in: query
        name: filter[agent]
        required: false
        schema:
          type: string
      - description: The agent pool identifier.
        in: query
        name: filter[agent-pool]
        required: false
        schema:
          type: string
      - description: The agent name.
        in: query
        name: filter[name]
        required: false
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - pool
            type: string
          type: array
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - last-seen-at
            - name
            - os
            - pool
            - status
            - version
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AgentListingDocument'
          description: Success.
        '404':
          description: User not authorized.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Agents
      tags:
      - agents
      x-resource: Agent
      x-service: tf-api
  /agents/{agent}:
    delete:
      description: |
        This endpoint deletes an agent by ID. Only `offline` or `errored` agents can be removed
        from the pool.

        Offline or errored agents will be removed automatically after 4 hours of inactivity.
      operationId: delete_agent
      parameters:
      - description: The ID of the agent to be deleted.
        in: path
        name: agent
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Deleted.
        '409':
          description: The agent is busy and can't be deleted.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete an Agent
      tags:
      - agents
      x-resource: Agent
      x-service: tf-api
    get:
      description: Show details of a specific agent.
      operationId: get_agent
      parameters:
      - description: The ID of the agent to show.
        in: path
        name: agent
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - pool
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AgentDocument'
          description: Success.
        '404':
          description: User not authorized or agent not found.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get an Agent
      tags:
      - agents
      x-resource: Agent
      x-service: tf-api
  /applies/{apply}:
    get:
      description: Show details of a specific Terraform Apply stage.
      operationId: get_apply
      parameters:
      - description: The ID of the apply.
        in: path
        name: apply
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/get-apply.yml
              schema:
                $ref: '#/components/schemas/ApplyDocument'
          description: Success.
        '403':
          description: Apply not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get an Apply
      tags:
      - applies
      x-resource: Apply
      x-service: tf-api
  /applies/{apply}/output:
    get:
      description: Download the raw output of the terraform apply stage.
      operationId: get_apply_log
      parameters:
      - description: |-
          The ID of the apply. Obtain it from the
          [Get a Run](get_run) endpoint.
        in: path
        name: apply
        required: true
        schema:
          type: string
      - description: Strip ANSI escape codes.
        in: query
        name: clean
        required: false
        schema:
          default: false
          type: boolean
      responses:
        '200':
          description: Apply log.
        '204':
          description: Apply has not yet completed or can't be served.
        '302':
          description: The location of the temporary download link.
        '404':
          description: Apply not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Apply Log
      tags:
      - applies
      x-mcp-tool: true
      x-resource: Apply
      x-service: tf-api
  /assume-service-account-policies:
    get:
      description: |
        List service account assume policies.
      operationId: list_assume_service_account_policies
      parameters:
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - provider
            - service-account
            type: string
          type: array
      - description: The service account filter.
        in: query
        name: filter[service-account]
        required: false
        schema:
          type: string
      - description: The workload identity provider filter.
        in: query
        name: filter[workload-identity-provider]
        required: false
        schema:
          type: string
      - description: The assume service account policy name filter.
        in: query
        name: filter[name]
        required: false
        schema:
          type: string
      - description: The ID(s) of assume service account policy(ies).
        in: query
        name: filter[assume-service-account-policy]
        required: false
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - email
            - name
            type: string
          type: array
      - description: Query string
        in: query
        name: query
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AssumeServiceAccountPolicyListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List service account assume policies
      tags:
      - service-accounts
      x-resource: ServiceAccount
      x-service: tf-api
  /configuration-versions:
    get:
      operationId: get_configuration_versions
      parameters:
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - vcs-revision
            type: string
          type: array
      - description: The ID of the workspace to list configurations from.
        example: ws-spturhj1dckd8so
        in: query
        name: filter[workspace]
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/get-configuration-versions.yml
              schema:
                $ref: '#/components/schemas/ConfigurationVersionListingDocument'
          description: The request was successful.
        '404':
          description: Workspace not found or user unauthorized to perform action
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Configuration Versions
      tags:
      - configuration-versions
      x-resource: ConfigurationVersion
      x-service: tf-api
    post:
      description: Create the new configuration version for specific workspace
      operationId: create_configuration_version
      parameters: []
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              0-tarball:
                $ref: examples/create-configuration-version-0-request-body.yml
              1-vcs:
                $ref: examples/create-configuration-version-1-request-body.yml
            schema:
              $ref: '#/components/schemas/ConfigurationVersionDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              examples:
                0-tarball:
                  $ref: examples/create-configuration-version-0-response.yml
                1-vcs:
                  $ref: examples/create-configuration-version-1-response.yml
              schema:
                $ref: '#/components/schemas/ConfigurationVersionDocument'
          description: The request was successful.
        '404':
          description: Workspace not found or user unauthorized to perform action.
        '409':
          description: Conflict; check the error object for more information.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create a Configuration Version
      tags:
      - configuration-versions
      x-resource: ConfigurationVersion
      x-service: tf-api
  /configuration-versions/{configuration_version}:
    get:
      description: Show details of a specific Configuration Version.
      operationId: get_configuration_version
      parameters:
      - description: The ID of the configuration version.
        in: path
        name: configuration_version
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - vcs-revision
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/get-configuration-version.yml
              schema:
                $ref: '#/components/schemas/ConfigurationVersionDocument'
          description: The request was successful.
        '404':
          description: Configuration version not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get a Configuration Version
      tags:
      - configuration-versions
      x-resource: ConfigurationVersion
      x-service: tf-api
  /configuration-versions/{configuration_version}/download:
    get:
      description: Download tar.gz archive with terraform configuration templates.
      operationId: download_configuration_version
      parameters:
      - description: The ID of the configuration version.
        in: path
        name: configuration_version
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
        '302':
          description: The location of the temporary download link.
        '404':
          description: Configuration version not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Download Configuration Version
      tags:
      - configuration-versions
      x-resource: ConfigurationVersion
      x-service: tf-api
  /cost-estimates/{cost_estimate}:
    get:
      description: Show details of a specific Cost Estimate phase.
      operationId: get_cost_estimate
      parameters:
      - description: |-
          The ID of the cost estimate. Obtain it from the
          [Get a Run](get_run) endpoint.
        in: path
        name: cost_estimate
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/get-cost-estimate.yml
              schema:
                $ref: '#/components/schemas/CostEstimateDocument'
          description: Success.
        '404':
          description: Cost estimate not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get a Cost Estimate
      tags:
      - cost-estimates
      x-resource: CostEstimate
      x-service: tf-api
  /cost-estimates/{cost_estimate}/breakdown:
    get:
      description: |-
        This endpoint generates a temporary public URL, that can be used to download
        a [JSON formatted cost breakdown](https://www.infracost.io/docs/multi_project/report/#examples).
      operationId: get_cost_estimate_breakdown
      parameters:
      - description: |-
          The ID of the cost estimate. Obtain it from the
          [Get a Run](get_run) endpoint.
        in: path
        name: cost_estimate
        required: true
        schema:
          type: string
      responses:
        '302':
          description: The location of the temporary download link.
        '404':
          description: Cost estimate not found or user unauthorized to perform action.
        '422':
          description: The cost estimation breakdown is not ready yet.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Cost breakdown JSON output
      tags:
      - cost-estimates
      x-resource: CostEstimate
      x-service: tf-api
  /cost-estimates/{cost_estimate}/output:
    get:
      description: |-
        This endpoint generates a temporary public URL, that can be used to download
        a raw `text/plan` output of the cost estimation.
      operationId: get_cost_estimate_log
      parameters:
      - description: |-
          The ID of the cost estimate. Obtain it from the
          [Get a Run](get_run) endpoint.
        in: path
        name: cost_estimate
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Success.
        '404':
          description: Cost estimate not found or user unauthorized to perform action.
        '422':
          description: The cost estimation output is not ready yet.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Cost Estimate log
      tags:
      - cost-estimates
      x-resource: CostEstimate
      x-service: tf-api
  /drift-detection-schedules:
    post:
      description: Create a new drift detection schedule.
      operationId: create_drift_detection_schedule
      parameters:
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            drift-detection-schedule:
              description: The comma-separated list of fields to return in response for DriftDetectionSchedule resource.
              type: string
          type: object
        style: deepObject
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/create-drifts-schedules.request.yml
            schema:
              $ref: '#/components/schemas/DriftDetectionScheduleDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/create-drifts-schedules.response.yml
              schema:
                $ref: '#/components/schemas/DriftDetectionScheduleDocument'
          description: Successfully created.
        '404':
          description: Integration not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create Drift Detection Schedule
      tags:
      - drift-detection-schedules
      x-resource: DriftDetectionSchedule
      x-service: tf-api
  /drift-detection-schedules/{drift_detection_schedule}:
    delete:
      operationId: delete_drift_detection_schedule
      parameters:
      - description: The ID of the drift_detection_schedule to delete.
        in: path
        name: drift_detection_schedule
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Successfully deletes the drift_detection_schedule.
        '404':
          description: drift_detection_schedule not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete a drift detection schedule
      tags:
      - drift-detection-schedules
      x-resource: DriftDetectionSchedule
      x-service: tf-api
    get:
      operationId: get_drift_detection_schedule
      parameters:
      - description: The ID of the drift_detection_schedule.
        in: path
        name: drift_detection_schedule
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/DriftDetectionScheduleDocument'
          description: Success.
        '404':
          description: drift_detection_schedule not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get a drift detection schedule
      tags:
      - drift-detection-schedules
      x-resource: DriftDetectionSchedule
      x-service: tf-api
    patch:
      operationId: update_drift_detection_schedule
      parameters:
      - description: The ID of the drift_detection_schedule to update.
        in: path
        name: drift_detection_schedule
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/DriftDetectionScheduleDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/DriftDetectionScheduleDocument'
          description: Successfully updates the drift_detection_schedule.
        '404':
          description: drift_detection_schedule not found, or user unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.)
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update a drift detection schedule
      tags:
      - drift-detection-schedules
      x-resource: DriftDetectionSchedule
      x-service: tf-api
  /environments:
    get:
      description: This endpoint lists account environments.
      operationId: list_environments
      parameters:
      - description: The ID of the Account
        in: query
        name: filter[account]
        required: false
        schema:
          type: string
      - description: The ID of the Environment
        in: query
        name: filter[environment]
        required: false
        schema:
          type: string
      - description: 'Filter by latest run date. Example: `filter[latest-run-date]=between:2022-01-01T00:00:00Z,2022-02-01T00:00:00Z`'
        in: query
        name: filter[latest-run-date]
        required: false
        schema:
          type: string
      - description: The ID of the Policy Group.
        in: query
        name: filter[policy-group]
        required: false
        schema:
          type: string
      - description: The ID of the Storage Profile.
        in: query
        name: filter[storage-profile]
        required: false
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: Query string, search by id, name.
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: Filter environments by tags
        in: query
        name: filter[tag]
        required: false
        schema:
          type: string
      - description: The environment name filter.
        in: query
        name: filter[name]
        required: false
        schema:
          type: string
      - description: Filter environments by favorite status. Set to 'true' to show only favorites, 'false' to exclude favorites.
        in: query
        name: filter[favorite]
        required: false
        schema:
          type: string
      - description: When set to 'true', favorite environments are shown first, followed by non-favorites. Both groups respect
          the main sort order.
        in: query
        name: sort[favorite-first]
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - account
            - created-at
            - created-by-email
            - name
            type: string
          type: array
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - account
            - created-by
            - default-provider-configurations
            - default-workspace-agent-pool
            - drift-detection-schedules
            - locked-by
            - policy-groups
            - provider-configurations
            - storage-profile
            - tags
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            accounts:
              description: The comma-separated list of fields to return in response for Account resource.
              type: string
            agent-pools:
              description: The comma-separated list of fields to return in response for AgentPool resource.
              type: string
            drift-detection-schedule:
              description: The comma-separated list of fields to return in response for DriftDetectionSchedule resource.
              type: string
            environments:
              description: The comma-separated list of fields to return in response for Environment resource.
              type: string
            policy-groups:
              description: The comma-separated list of fields to return in response for PolicyGroup resource.
              type: string
            provider-configurations:
              description: The comma-separated list of fields to return in response for ProviderConfiguration resource.
              type: string
            storage-profiles:
              description: The comma-separated list of fields to return in response for StorageProfile resource.
              type: string
            tags:
              description: The comma-separated list of fields to return in response for Tag resource.
              type: string
            users:
              description: The comma-separated list of fields to return in response for User resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/get-environments.yml
              schema:
                $ref: '#/components/schemas/EnvironmentListingDocument'
          description: Success.
        '404':
          description: Account not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Environments
      tags:
      - environments
      x-mcp-tool: true
      x-resource: Environment
      x-service: tf-api
    post:
      description: Create a new environment in the account.
      operationId: create_environment
      parameters:
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            accounts:
              description: The comma-separated list of fields to return in response for Account resource.
              type: string
            agent-pools:
              description: The comma-separated list of fields to return in response for AgentPool resource.
              type: string
            drift-detection-schedule:
              description: The comma-separated list of fields to return in response for DriftDetectionSchedule resource.
              type: string
            environments:
              description: The comma-separated list of fields to return in response for Environment resource.
              type: string
            policy-groups:
              description: The comma-separated list of fields to return in response for PolicyGroup resource.
              type: string
            provider-configurations:
              description: The comma-separated list of fields to return in response for ProviderConfiguration resource.
              type: string
            storage-profiles:
              description: The comma-separated list of fields to return in response for StorageProfile resource.
              type: string
            tags:
              description: The comma-separated list of fields to return in response for Tag resource.
              type: string
            users:
              description: The comma-separated list of fields to return in response for User resource.
              type: string
          type: object
        style: deepObject
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/create-environment-request-body.yml
              tags:
                $ref: examples/create-environment-request-tags.yml
            schema:
              $ref: '#/components/schemas/EnvironmentDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/create-environment-response.yml
              schema:
                $ref: '#/components/schemas/EnvironmentDocument'
          description: The environment was created.
        '404':
          description: Account relationship not found, or user unauthorized to perform action.
        '422':
          description: Invalid arguments.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create an Environment
      tags:
      - environments
      x-resource: Environment
      x-service: tf-api
  /environments/{environment}:
    delete:
      operationId: delete_environment
      parameters:
      - description: The ID of the environment to delete.
        in: path
        name: environment
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Successfully deleted the environment.
        '403':
          description: Environment deletion is forbidden.
        '404':
          description: Environment not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete an Environment
      tags:
      - environments
      x-resource: Environment
      x-service: tf-api
    get:
      description: Show details of a specific environment.
      operationId: get_environment
      parameters:
      - description: The ID of the environment.
        in: path
        name: environment
        required: true
        schema:
          type: string
      - description: Track environment access by the user
        in: query
        name: track_access
        required: false
        schema:
          default: false
          type: boolean
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - account
            - created-by
            - default-provider-configurations
            - default-workspace-agent-pool
            - drift-detection-schedules
            - locked-by
            - policy-groups
            - provider-configurations
            - storage-profile
            - tags
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            accounts:
              description: The comma-separated list of fields to return in response for Account resource.
              type: string
            agent-pools:
              description: The comma-separated list of fields to return in response for AgentPool resource.
              type: string
            drift-detection-schedule:
              description: The comma-separated list of fields to return in response for DriftDetectionSchedule resource.
              type: string
            environments:
              description: The comma-separated list of fields to return in response for Environment resource.
              type: string
            policy-groups:
              description: The comma-separated list of fields to return in response for PolicyGroup resource.
              type: string
            provider-configurations:
              description: The comma-separated list of fields to return in response for ProviderConfiguration resource.
              type: string
            storage-profiles:
              description: The comma-separated list of fields to return in response for StorageProfile resource.
              type: string
            tags:
              description: The comma-separated list of fields to return in response for Tag resource.
              type: string
            users:
              description: The comma-separated list of fields to return in response for User resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/get-environment.yml
              schema:
                $ref: '#/components/schemas/EnvironmentDocument'
          description: Success.
        '404':
          description: Environment not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get an Environment
      tags:
      - environments
      x-mcp-tool: true
      x-resource: Environment
      x-service: tf-api
    patch:
      operationId: update_environment
      parameters:
      - description: The ID of the environment to update.
        in: path
        name: environment
        required: true
        schema:
          type: string
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            accounts:
              description: The comma-separated list of fields to return in response for Account resource.
              type: string
            agent-pools:
              description: The comma-separated list of fields to return in response for AgentPool resource.
              type: string
            drift-detection-schedule:
              description: The comma-separated list of fields to return in response for DriftDetectionSchedule resource.
              type: string
            environments:
              description: The comma-separated list of fields to return in response for Environment resource.
              type: string
            policy-groups:
              description: The comma-separated list of fields to return in response for PolicyGroup resource.
              type: string
            provider-configurations:
              description: The comma-separated list of fields to return in response for ProviderConfiguration resource.
              type: string
            storage-profiles:
              description: The comma-separated list of fields to return in response for StorageProfile resource.
              type: string
            tags:
              description: The comma-separated list of fields to return in response for Tag resource.
              type: string
            users:
              description: The comma-separated list of fields to return in response for User resource.
              type: string
          type: object
        style: deepObject
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/update-environment-request-body.yml
              link-policygroups:
                $ref: examples/update-environment-request-link-policygroups.yml
            schema:
              $ref: '#/components/schemas/EnvironmentDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/update-environment-response.yml
              schema:
                $ref: '#/components/schemas/EnvironmentDocument'
          description: Successfully updated the environment.
        '404':
          description: Environment or relationship not found, or user unauthorized to perform action.
        '422':
          description: Invalid arguments.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update Environment
      tags:
      - environments
      x-resource: Environment
      x-service: tf-api
  /environments/{environment}/actions/favorite:
    post:
      description: Add an environment to the current user's favorites.
      operationId: add_environment_to_favorites
      parameters:
      - description: The ID of the environment.
        in: path
        name: environment
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/EnvironmentDocument'
          description: Success.
        '404':
          description: Environment not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Favorite a environment
      tags:
      - favorite-environments
      x-resource: Environment
      x-service: tf-api
  /environments/{environment}/actions/lock:
    post:
      description: This endpoint locks an environment.
      operationId: lock_environment
      parameters:
      - description: The environment ID to lock.
        in: path
        name: environment
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EnvLockReason'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/EnvironmentDocument'
          description: Successfully locked the environment.
        '404':
          description: Environment not found, or user unauthorized to perform action.
        '409':
          description: Environment already locked.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Lock an Environment
      tags:
      - environments
      x-resource: Environment
      x-service: tf-api
  /environments/{environment}/actions/unfavorite:
    post:
      description: Remove an environment from the current user's favorites.
      operationId: remove_environment_from_favorites
      parameters:
      - description: The ID of the environment.
        in: path
        name: environment
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/EnvironmentDocument'
          description: Success.
        '404':
          description: Environment not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Unfavorite an environment
      tags:
      - favorite-environments
      x-resource: Environment
      x-service: tf-api
  /environments/{environment}/actions/unlock:
    post:
      description: This endpoint unlocks an environment.
      operationId: unlock_environment
      parameters:
      - description: The environment ID to unlock.
        in: path
        name: environment
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/EnvironmentDocument'
          description: Successfully unlocked the environment.
        '404':
          description: Environment not found, or user unauthorized to perform action.
        '409':
          description: Environment is not locked.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Unlock an Environment
      tags:
      - environments
      x-resource: Environment
      x-service: tf-api
  /environments/{environment}/relationships/federated-environments:
    delete:
      description: |-
        This endpoint removes provided environments
        from a list of federated one for a given environment.
      operationId: delete_federated_environment
      parameters:
      - description: |
          The ID of the environment to update.
        in: path
        name: environment
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/delete-federated-environments-request-body.yml
            schema:
              $ref: '#/components/schemas/FederatedEnvironmentRelationshipFieldsetsListingDocument'
      responses:
        '204':
          description: Successfully deleted the federated environment relationship.
        '404':
          description: Environment not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete federated environment relationship
      tags:
      - federated-environments
      x-resource: Environment
      x-service: tf-api
    get:
      operationId: list_federated_environments
      parameters:
      - description: |
          The ID of the environment for which to list federated environments relationship.
        in: path
        name: environment
        required: true
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/FederatedEnvironmentRelationshipFieldsetsListingDocument'
          description: Successfully listed the federated environments relationship.
        '404':
          description: Environments not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List environment's federated environments relationship
      tags:
      - federated-environments
      x-resource: Environment
      x-service: tf-api
    patch:
      operationId: replace_federated_environments
      parameters:
      - description: The ID of the environment to update.
        in: path
        name: environment
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/update-federated-environments-request-body.yml
            schema:
              $ref: '#/components/schemas/FederatedEnvironmentRelationshipFieldsetsListingDocument'
      responses:
        '204':
          description: Successfully updated the federated environments relationships.
        '404':
          description: Environments not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update federated environments relationships
      tags:
      - federated-environments
      x-resource: Environment
      x-service: tf-api
    post:
      operationId: add_federated_environments
      parameters:
      - description: The ID of the environment to update.
        in: path
        name: environment
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/create-federated-environments-request-body.yml
            schema:
              $ref: '#/components/schemas/FederatedEnvironmentRelationshipFieldsetsListingDocument'
      responses:
        '204':
          description: Successfully created the federated environments relationships.
        '404':
          description: Environments not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create environment's federated environments relationships
      tags:
      - federated-environments
      x-resource: Environment
      x-service: tf-api
  /environments/{environment}/relationships/tags:
    delete:
      description: |
        This endpoint removes given [tags](/docs/tags-1) from the environment.
      operationId: delete_environment_tags
      parameters:
      - description: |
          The environment whose tags will be deleted.
        in: path
        name: environment
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/update-resource-tags-request.yml
            schema:
              $ref: '#/components/schemas/TagRelationshipFieldsetsListingDocument'
      responses:
        '204':
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete environment's tags
      tags:
      - environments
      x-resource: Environment
      x-service: tf-api
    get:
      description: |
        This endpoint returns a list of [tags](/docs/tags-1),
        assigned to an environment.
      operationId: list_environment_tags
      parameters:
      - description: |
          The environment to list tags for.
        in: path
        name: environment
        required: true
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/list-environment-tags-response.yml
              schema:
                $ref: '#/components/schemas/TagRelationshipFieldsetsListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List environment's tags
      tags:
      - environments
      x-resource: Environment
      x-service: tf-api
    patch:
      description: |
        This endpoint completely replaces environment's tags with provided list.
      operationId: replace_environment_tags
      parameters:
      - description: |
          The environment whose tags will be replaced.
        in: path
        name: environment
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/update-resource-tags-request.yml
              empty:
                $ref: examples/replace-resource-tags-empty-request.yml
            schema:
              $ref: '#/components/schemas/TagRelationshipFieldsetsListingDocument'
      responses:
        '204':
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Replace environment's tags
      tags:
      - environments
      x-resource: Environment
      x-service: tf-api
    post:
      description: |
        This endpoint assigns the list of [tags](/docs/tags-1) to the environment.
      operationId: add_environment_tags
      parameters:
      - description: |
          The environment to add the tags to.
        in: path
        name: environment
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/update-resource-tags-request.yml
            schema:
              $ref: '#/components/schemas/TagRelationshipFieldsetsListingDocument'
      responses:
        '204':
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Add tags to the environment
      tags:
      - environments
      x-resource: Environment
      x-service: tf-api
  /event-definitions:
    get:
      operationId: list_event_definitions
      parameters: []
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/list-event-definitions.yml
              schema:
                $ref: '#/components/schemas/EventDefinitionListingDocument'
          description: Success.
        '404':
          description: User unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Event Definitions
      tags:
      - event-definitions
      x-resource: EventDefinition
      x-service: tf-api
  /hook-environment-links:
    get:
      description: |
        List all hook-environment links.
      operationId: list_hook_environment_links
      parameters:
      - description: The ID of the Environment
        in: query
        name: filter[environment]
        required: true
        schema:
          type: string
      - description: The events to filter by
        in: query
        name: filter[events]
        required: false
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The search string. Supports search by name/id of the Hook.
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - name
            - updated-at
            - updated-by
            type: string
          type: array
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - hook
            - vcs-provider
            - vcs-revision
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            hook-environment-links:
              description: The comma-separated list of fields to return in response for HookEnvironmentLink resource.
              type: string
            hooks:
              description: The comma-separated list of fields to return in response for Hook resource.
              type: string
            vcs-providers:
              description: The comma-separated list of fields to return in response for VcsProvider resource.
              type: string
            vcs-revisions:
              description: The comma-separated list of fields to return in response for VcsRevision resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/HookEnvironmentLinkListingDocument'
          description: Successfully retrieved links.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Hook Environment Links
      tags:
      - hook-environment-links
      x-resource: HookEnvironmentLink
      x-service: tf-api
    post:
      description: |
        Creates a link between a hook and an environment with enabled phases.
      operationId: create_hook_environment_link
      parameters: []
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/HookEnvironmentLinkDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/HookEnvironmentLinkDocument'
          description: Successfully created link.
        '400':
          description: Validation error.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create Hook Environment Link
      tags:
      - hook-environment-links
      x-resource: HookEnvironmentLink
      x-service: tf-api
  /hook-environment-links/{hook_environment_link}:
    delete:
      description: |
        Delete a hook-environment link.
      operationId: delete_hook_environment_link
      parameters:
      - in: path
        name: hook_environment_link
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Success.
        '404':
          description: The link not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete Hook Environment Link
      tags:
      - hook-environment-links
      x-resource: HookEnvironmentLink
      x-service: tf-api
    get:
      description: |
        Get a hook-environment link.
      operationId: get_hook_environment_link
      parameters:
      - in: path
        name: hook_environment_link
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - hook
            - vcs-provider
            - vcs-revision
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            hook-environment-links:
              description: The comma-separated list of fields to return in response for HookEnvironmentLink resource.
              type: string
            hooks:
              description: The comma-separated list of fields to return in response for Hook resource.
              type: string
            vcs-providers:
              description: The comma-separated list of fields to return in response for VcsProvider resource.
              type: string
            vcs-revisions:
              description: The comma-separated list of fields to return in response for VcsRevision resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/HookEnvironmentLinkDocument'
          description: Successfully retrieved link.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get Hook Environment Link
      tags:
      - hook-environment-links
      x-resource: HookEnvironmentLink
      x-service: tf-api
    patch:
      description: |
        Update a hook-environment link.
      operationId: update_hook_environment_link
      parameters:
      - in: path
        name: hook_environment_link
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/HookEnvironmentLinkDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/HookEnvironmentLinkDocument'
          description: Successfully updated link.
        '422':
          description: Validation error.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update Hook Environment Link
      tags:
      - hook-environment-links
      x-resource: HookEnvironmentLink
      x-service: tf-api
  /hooks:
    get:
      description: This endpoint returns a list of hooks by various filters.
      operationId: list_hooks
      parameters:
      - description: The Hook name filter.
        in: query
        name: filter[name]
        required: false
        schema:
          type: string
      - description: The ID of the VCS provider
        in: query
        name: filter[vcs-provider]
        required: false
        schema:
          type: string
      - description: The ID(s) of the Hook(s).
        in: query
        name: filter[hook]
        required: false
        schema:
          type: string
      - description: 'The status of the Hook. Possible values: ''pending'', ''active'', ''errored''.'
        in: query
        name: filter[status]
        required: false
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The search string. Supports search by name/id of the Hook.
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - name
            - updated-at
            - updated-by
            type: string
          type: array
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - account
            - readme
            - updated-by
            - vcs-provider
            - vcs-revision
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            accounts:
              description: The comma-separated list of fields to return in response for Account resource.
              type: string
            hook-readme:
              description: The comma-separated list of fields to return in response for HookReadme resource.
              type: string
            hooks:
              description: The comma-separated list of fields to return in response for Hook resource.
              type: string
            users:
              description: The comma-separated list of fields to return in response for User resource.
              type: string
            vcs-providers:
              description: The comma-separated list of fields to return in response for VcsProvider resource.
              type: string
            vcs-revisions:
              description: The comma-separated list of fields to return in response for VcsRevision resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/HookListingDocument'
          description: Success.
        '404':
          description: User unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Hooks
      tags:
      - hooks
      x-resource: Hook
      x-service: tf-api
    post:
      description: |
        Creates a Hook from a VCS repository. The repository is cloned asynchronously,
        and the specified folder is archived and uploaded to the Blob storage.
      operationId: create_hook
      parameters: []
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/HookDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/HookDocument'
          description: Successfully created hook.
        '403':
          description: User unauthorized to perform action.
        '404':
          description: Relationship resource not found, or user unauthorized to perform action.
        '422':
          description: Malformed request or validation error.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create Hook
      tags:
      - hooks
      x-resource: Hook
      x-service: tf-api
  /hooks/{hook}:
    delete:
      description: Deletes a specific hook by its ID.
      operationId: delete_hook
      parameters:
      - in: path
        name: hook
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Success.
        '404':
          description: Hook not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete Hook
      tags:
      - hooks
      x-resource: Hook
      x-service: tf-api
    get:
      description: Retrieves details of a specific hook by its ID.
      operationId: get_hook
      parameters:
      - in: path
        name: hook
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - account
            - readme
            - updated-by
            - vcs-provider
            - vcs-revision
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            accounts:
              description: The comma-separated list of fields to return in response for Account resource.
              type: string
            hook-readme:
              description: The comma-separated list of fields to return in response for HookReadme resource.
              type: string
            hooks:
              description: The comma-separated list of fields to return in response for Hook resource.
              type: string
            users:
              description: The comma-separated list of fields to return in response for User resource.
              type: string
            vcs-providers:
              description: The comma-separated list of fields to return in response for VcsProvider resource.
              type: string
            vcs-revisions:
              description: The comma-separated list of fields to return in response for VcsRevision resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/HookDocument'
          description: Success.
        '404':
          description: Hook not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get Hook
      tags:
      - hooks
      x-resource: Hook
      x-service: tf-api
    patch:
      description: Updates a specific hook by its ID.
      operationId: update_hook
      parameters:
      - in: path
        name: hook
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/HookDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/HookDocument'
          description: Success.
        '404':
          description: Hook not found, or user unauthorized to perform action.
        '422':
          description: Malformed request or validation error.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update Hook
      tags:
      - hooks
      x-resource: Hook
      x-service: tf-api
  /hooks/{hook}/actions/resync:
    post:
      description: Triggers a resync of the Hook.
      operationId: resync_hook
      parameters:
      - in: path
        name: hook
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Success.
        '404':
          description: Hook not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Resync Hook
      tags:
      - hooks
      x-resource: Hook
      x-service: tf-api
  /iam/signin/{provider}:
    get:
      operationId: oauth_signin
      parameters:
      - description: |
          The provider to sign in to.
        in: path
        name: provider
        required: true
        schema:
          enum:
          - github
          - google
          type: string
      responses:
        '307':
          description: App redirect.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Authenticate endpoint for signing in to an existing account.
      tags:
      - auth
      x-resource: null
      x-service: tf-api
  /iam/signup/{provider}:
    get:
      operationId: oauth_signup
      parameters:
      - description: |
          The provider to sign up with.
        in: path
        name: provider
        required: true
        schema:
          enum:
          - github
          - google
          type: string
      responses:
        '307':
          description: App redirect.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Authenticate endpoint for signing up for a new account.
      tags:
      - auth
      x-resource: null
      x-service: tf-api
  /integrations/aws-event-bridge:
    get:
      description: This endpoint returns a list of AWS EventBridge integrations.
      operationId: list_aws_event_bridge_integrations
      parameters:
      - description: Filter by Event Bridge integration name
        in: query
        name: filter[name]
        required: false
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - name
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AWSEventBridgeIntegrationListingDocument'
          description: |
            Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List AWS EventBridge Integrations
      tags:
      - aws-event-bridge-integrations
      x-resource: AWSEventBridgeIntegration
      x-service: tf-api
    post:
      description: This endpoint creates AWS EventBridge integration.
      operationId: create_aws_event_bridge_integration
      parameters: []
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/create-event-bridge-integration-request.yml
            schema:
              $ref: '#/components/schemas/AWSEventBridgeIntegrationDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/create-event-bridge-integration-response.yml
              schema:
                $ref: '#/components/schemas/AWSEventBridgeIntegrationDocument'
          description: Successfully created.
        '404':
          description: Resource not found or user unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create AWS EventBridge Integration
      tags:
      - aws-event-bridge-integrations
      x-resource: AWSEventBridgeIntegration
      x-service: tf-api
  /integrations/aws-event-bridge/{aws_event_bridge_integration}:
    delete:
      operationId: delete_aws_event_bridge_integration
      parameters:
      - in: path
        name: aws_event_bridge_integration
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Successfully deleted the AWS EventBridge integration.
        '404':
          description: Integration not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete the AWS EventBridge integration
      tags:
      - aws-event-bridge-integrations
      x-resource: AWSEventBridgeIntegration
      x-service: tf-api
    get:
      description: Show details of a specific AWS EventBridge integration.
      operationId: get_aws_event_bridge_integration
      parameters:
      - description: The ID of the integration.
        in: path
        name: aws_event_bridge_integration
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AWSEventBridgeIntegrationDocument'
          description: Success.
        '404':
          description: Integration not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get AWS EventBridge Integration
      tags:
      - aws-event-bridge-integrations
      x-resource: AWSEventBridgeIntegration
      x-service: tf-api
    patch:
      description: This endpoint updates AWS EventBridge integrations.
      operationId: update_aws_event_bridge_integration
      parameters:
      - in: path
        name: aws_event_bridge_integration
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/AWSEventBridgeIntegrationDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AWSEventBridgeIntegrationDocument'
          description: Success.
        '404':
          description: Integration not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update AWS EventBridge Integrations
      tags:
      - aws-event-bridge-integrations
      x-resource: AWSEventBridgeIntegration
      x-service: tf-api
  /integrations/checkov:
    get:
      description: This endpoint returns a list of Checkov integrations.
      operationId: list_checkov_integrations
      parameters:
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - environments
            - vcs-provider
            type: string
          type: array
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - name
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/CheckovIntegrationListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Checkov integrations
      tags:
      - checkov-integrations
      x-resource: CheckovIntegration
      x-service: tf-api
    post:
      description: This endpoint creates Checkov integration.
      operationId: create_checkov_integration
      parameters:
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - environments
            - vcs-provider
            type: string
          type: array
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/CheckovIntegrationDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/CheckovIntegrationDocument'
          description: Success.
        '404':
          description: Account not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create Checkov integration
      tags:
      - checkov-integrations
      x-resource: CheckovIntegration
      x-service: tf-api
  /integrations/checkov/{integration}:
    delete:
      operationId: delete_checkov_integration
      parameters:
      - description: The ID of the integration to delete.
        in: path
        name: integration
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Successfully deleted the Checkov integration.
        '404':
          description: Integration not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete the Checkov integration.
      tags:
      - checkov-integrations
      x-resource: CheckovIntegration
      x-service: tf-api
    get:
      description: Show details of a specific Checkov Integration.
      operationId: get_checkov_integration
      parameters:
      - description: The ID of the integration.
        in: path
        name: integration
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - environments
            - vcs-provider
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/CheckovIntegrationDocument'
          description: Success.
        '404':
          description: Integration not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get Checkov integration
      tags:
      - checkov-integrations
      x-resource: CheckovIntegration
      x-service: tf-api
    patch:
      description: This endpoint updates Checkov integration.
      operationId: update_checkov_integration
      parameters:
      - description: The ID of the integration to update.
        in: path
        name: integration
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - environments
            - vcs-provider
            type: string
          type: array
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/CheckovIntegrationDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/CheckovIntegrationDocument'
          description: ''
        '201':
          description: Success.
        '404':
          description: Resource not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update Checkov integration
      tags:
      - checkov-integrations
      x-resource: CheckovIntegration
      x-service: tf-api
  /integrations/checkov/{integration}/actions/resync:
    post:
      operationId: resync_checkov_integration
      parameters:
      - description: The ID of the integration to delete.
        in: path
        name: integration
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Successfully scheduled resync of Checkov external checks.
        '404':
          description: Integration not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Resync Checkov external checks.
      tags:
      - checkov-integrations
      x-resource: CheckovIntegration
      x-service: tf-api
  /integrations/datadog:
    get:
      description: This endpoint lists Datadog integrations.
      operationId: list_datadog_integrations
      parameters:
      - description: The ID of the Account
        in: query
        name: filter[account]
        required: true
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - name
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/DatadogIntegrationListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Account not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Datadog Integrations
      tags:
      - datadog-integrations
      x-resource: DatadogIntegration
      x-service: tf-api
    post:
      description: |
        This endpoint creates Datadog integrations.
      operationId: create_datadog_integration
      parameters: []
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/create-datadog-integration-request.yml
            schema:
              $ref: '#/components/schemas/DatadogIntegrationDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/create-datadog-integration-response.yml
              schema:
                $ref: '#/components/schemas/DatadogIntegrationDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Account not found or user unauthorized to perform action.
        '422':
          description: Invalid arguments.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create Datadog Integrations
      tags:
      - datadog-integrations
      x-resource: DatadogIntegration
      x-service: tf-api
  /integrations/datadog/{datadog_integration}:
    delete:
      operationId: delete_datadog_integration
      parameters:
      - in: path
        name: datadog_integration
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Successfully deleted the Datadog integration.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Integration not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete the Datadog integration
      tags:
      - datadog-integrations
      x-resource: DatadogIntegration
      x-service: tf-api
    get:
      description: |
        Show details of a specific Datadog Integration.
      operationId: get_datadog_integration
      parameters:
      - description: |
          The ID of the integration.
        in: path
        name: datadog_integration
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/get-datadog-integration-response.yml
              schema:
                $ref: '#/components/schemas/DatadogIntegrationDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Integration not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get Datadog Integration
      tags:
      - datadog-integrations
      x-resource: DatadogIntegration
      x-service: tf-api
    patch:
      description: |
        This endpoint updates Datadog integrations.
      operationId: update_datadog_integrations
      parameters:
      - in: path
        name: datadog_integration
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/update-datadog-integration-request.yml
            schema:
              $ref: '#/components/schemas/DatadogIntegrationDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/update-datadog-integration-response.yml
              schema:
                $ref: '#/components/schemas/DatadogIntegrationDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Integration not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update Datadog Integrations
      tags:
      - datadog-integrations
      x-resource: DatadogIntegration
      x-service: tf-api
  /integrations/docker:
    get:
      description: List Docker integrations.
      operationId: list_docker_integrations
      parameters:
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - name
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            docker-integrations:
              description: The comma-separated list of fields to return in response for DockerIntegration resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/DockerIntegrationListingDocument'
          description: ''
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Docker integrations
      tags:
      - docker-integrations
      x-resource: DockerIntegration
      x-service: tf-api
    post:
      description: Create a Docker integration.
      operationId: create_docker_integration
      parameters: []
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/DockerIntegrationDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/DockerIntegrationDocument'
          description: ''
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create a Docker integration
      tags:
      - docker-integrations
      x-resource: DockerIntegration
      x-service: tf-api
  /integrations/docker/{docker_integration}:
    delete:
      description: Delete a Docker integration.
      operationId: delete_docker_integration
      parameters:
      - in: path
        name: docker_integration
        required: true
        schema:
          type: string
      responses:
        '204':
          description: ''
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete a Docker integration
      tags:
      - docker-integrations
      x-resource: DockerIntegration
      x-service: tf-api
    get:
      description: Get a Docker integration.
      operationId: get_docker_integration
      parameters:
      - in: path
        name: docker_integration
        required: true
        schema:
          type: string
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            docker-integrations:
              description: The comma-separated list of fields to return in response for DockerIntegration resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/DockerIntegrationDocument'
          description: ''
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get a Docker integration
      tags:
      - docker-integrations
      x-resource: DockerIntegration
      x-service: tf-api
    patch:
      description: Update a Docker integration.
      operationId: update_docker_integration
      parameters:
      - in: path
        name: docker_integration
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/DockerIntegrationDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/DockerIntegrationDocument'
          description: ''
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update a Docker integration
      tags:
      - docker-integrations
      x-resource: DockerIntegration
      x-service: tf-api
  /integrations/infracost:
    get:
      description: This endpoint returns a list of Infracost integrations.
      operationId: list_infracost_integrations
      parameters:
      - description: The Infracost integration name filter.
        in: query
        name: filter[name]
        required: false
        schema:
          type: string
      - description: The ID(s) of the Infracost integration(s).
        in: query
        name: filter[infracost-integration]
        required: false
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - environments
            type: string
          type: array
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - name
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/InfracostIntegrationListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Infracost integrations
      tags:
      - infracost-integrations
      x-resource: InfracostIntegration
      x-service: tf-api
    post:
      description: This endpoint creates Infracost integration.
      operationId: create_infracost_integration
      parameters:
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - environments
            type: string
          type: array
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/InfracostIntegrationDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/InfracostIntegrationDocument'
          description: Success.
        '404':
          description: Account not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create Infracost integration
      tags:
      - infracost-integrations
      x-resource: InfracostIntegration
      x-service: tf-api
  /integrations/infracost/{infracost_integration}:
    delete:
      operationId: delete_infracost_integration
      parameters:
      - description: The ID of the integration to delete.
        in: path
        name: infracost_integration
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Successfully deleted the Infracost integration.
        '404':
          description: Integration not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete the Infracost integration.
      tags:
      - infracost-integrations
      x-resource: InfracostIntegration
      x-service: tf-api
    get:
      description: Show details of a specific Infracost Integration.
      operationId: get_infracost_integration
      parameters:
      - description: The ID of the integration.
        in: path
        name: infracost_integration
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - environments
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/InfracostIntegrationDocument'
          description: Success.
        '404':
          description: Integration not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get Infracost integration
      tags:
      - infracost-integrations
      x-resource: InfracostIntegration
      x-service: tf-api
    patch:
      description: This endpoint updates Infracost integration.
      operationId: update_infracost_integration
      parameters:
      - description: The ID of the integration to update.
        in: path
        name: infracost_integration
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - environments
            type: string
          type: array
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/InfracostIntegrationDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/InfracostIntegrationDocument'
          description: ''
        '201':
          description: Success.
        '404':
          description: Resource not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update Infracost integration
      tags:
      - infracost-integrations
      x-resource: InfracostIntegration
      x-service: tf-api
  /integrations/saml:
    get:
      description: |
        This endpoint lists SAML integrations.
      operationId: list_saml_integrations
      parameters:
      - description: The ID of the Account
        in: query
        name: filter[account]
        required: true
        schema:
          type: string
      - description: Filter by source of SAML integration
        in: query
        name: filter[source]
        required: false
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - name
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/list-saml-integrations-response.yml
              schema:
                $ref: '#/components/schemas/SamlIntegrationListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform action.
        '404':
          description: Account not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List SAML Integrations
      tags:
      - saml-integrations
      x-resource: SamlIntegration
      x-service: tf-api
    post:
      description: |
        Create SAML Integration.
      operationId: create_saml_integration
      parameters: []
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/create-saml-integration-request.yml
            schema:
              $ref: '#/components/schemas/SamlIntegrationDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/create-saml-integration-response.yml
              schema:
                $ref: '#/components/schemas/SamlIntegrationDocument'
          description: Success.
        '403':
          description: User unauthorized to perform action.
        '404':
          description: Account not found or user unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create SAML Integration
      tags:
      - saml-integrations
      x-resource: SamlIntegration
      x-service: tf-api
  /integrations/saml/{saml_integration}:
    delete:
      description: Delete SAML Integration.
      operationId: delete_saml_integration
      parameters:
      - description: The ID of the integration.
        in: path
        name: saml_integration
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Success.
        '403':
          description: User unauthorized to perform action.
        '404':
          description: Integration not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete SAML Integration
      tags:
      - saml-integrations
      x-resource: SamlIntegration
      x-service: tf-api
    get:
      description: Show details of a specific SAML Integration.
      operationId: get_saml_integration
      parameters:
      - description: |
          The ID of the integration.
        in: path
        name: saml_integration
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/get-saml-integration-response.yml
              schema:
                $ref: '#/components/schemas/SamlIntegrationDocument'
          description: Success.
        '403':
          description: User unauthorized to perform action.
        '404':
          description: Integration not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get SAML Integration
      tags:
      - saml-integrations
      x-resource: SamlIntegration
      x-service: tf-api
    patch:
      description: Update SAML Integration.
      operationId: update_saml_integration
      parameters:
      - description: The ID of the integration.
        in: path
        name: saml_integration
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/update-saml-integration-request.yml
            schema:
              $ref: '#/components/schemas/SamlIntegrationDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/update-saml-integration-response.yml
              schema:
                $ref: '#/components/schemas/SamlIntegrationDocument'
          description: Success.
        '403':
          description: User unauthorized to perform action.
        '404':
          description: Integration not found or user unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update SAML Integration
      tags:
      - saml-integrations
      x-resource: SamlIntegration
      x-service: tf-api
  /integrations/slack:
    get:
      description: This endpoint returns a list of Slack integrations.
      operationId: list_slack_integrations
      parameters:
      - description: The ID of the Account
        in: query
        name: filter[account]
        required: true
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - environments
            - workspaces
            type: string
          type: array
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - name
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/SlackIntegrationListingDocument'
          description: |
            Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Slack Integrations
      tags:
      - slack-integrations
      x-resource: SlackIntegration
      x-service: tf-api
    post:
      description: This endpoint creates Slack integration.
      operationId: create_slack_integration
      parameters: []
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/create-slack-integration-request.yml
            schema:
              $ref: '#/components/schemas/SlackIntegrationDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/create-slack-integration-response.yml
              schema:
                $ref: '#/components/schemas/SlackIntegrationDocument'
          description: Successfully created.
        '404':
          description: Resource not found or user unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create Slack Integration
      tags:
      - slack-integrations
      x-resource: SlackIntegration
      x-service: tf-api
  /integrations/slack/{account}/connection:
    delete:
      description: Remove Slack App connection for the account.
      operationId: delete_slack_connection
      parameters:
      - description: The ID of the account.
        in: path
        name: account
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Account or connection not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete Slack connection
      tags:
      - slack-connections
      x-resource: SlackConnection
      x-service: tf-api
    get:
      description: Show details of account's Slack App connection.
      operationId: get_slack_connection
      parameters:
      - description: The ID of the account.
        in: path
        name: account
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/get-slack-connection-response.yml
              schema:
                $ref: '#/components/schemas/SlackConnectionDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Account not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get Slack connection
      tags:
      - slack-connections
      x-resource: SlackConnection
      x-service: tf-api
  /integrations/slack/{account}/connection/channels:
    get:
      description: Get a list of channels from associated Slack workspace.
      operationId: list_slack_channels
      parameters:
      - description: The ID of the account.
        in: path
        name: account
        required: true
        schema:
          type: string
      - description: The search string. Supports search by channel name.
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: Invalidate cache for the request
        in: query
        name: ignore_cache
        required: false
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              examples:
                default:
                  $ref: examples/list-slack-channels-response.yml
              schema:
                $ref: '#/components/schemas/SlackChannelFieldsetsListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Account or connection not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Slack channels
      tags:
      - slack-connections
      x-resource: SlackConnection
      x-service: tf-api
  /integrations/slack/{account}/connection/channels/{channel_id}:
    get:
      description: Get a specific Slack channel by ID.
      operationId: get_slack_channel
      parameters:
      - description: The ID of the account.
        in: path
        name: account
        required: true
        schema:
          type: string
      - description: The ID of the channel.
        in: path
        name: channel_id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SlackChannel'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: |-
            The Slack channel, connection or account not found
            or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get Slack channel
      tags:
      - slack-connections
      x-resource: SlackConnection
      x-service: tf-api
  /integrations/slack/{slack_integration}:
    delete:
      description: This endpoint deletes Slack integration.
      operationId: delete_slack_integration
      parameters:
      - description: The ID of the Slack integration to delete.
        in: path
        name: slack_integration
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Successfully deleted the Slack integration.
        '404':
          description: Integration not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete the Slack integration
      tags:
      - slack-integrations
      x-resource: SlackIntegration
      x-service: tf-api
    get:
      description: Show details of a specific Slack integration.
      operationId: get_slack_integration
      parameters:
      - description: The ID of the integration.
        in: path
        name: slack_integration
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - environments
            - workspaces
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/get-slack-integration-response.yml
              schema:
                $ref: '#/components/schemas/SlackIntegrationDocument'
          description: Success.
        '404':
          description: Integration not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get Slack Integration
      tags:
      - slack-integrations
      x-resource: SlackIntegration
      x-service: tf-api
    patch:
      description: This endpoint updates Slack integration.
      operationId: update_slack_integration
      parameters:
      - description: The ID of the Slack integration to update.
        in: path
        name: slack_integration
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/SlackIntegrationDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/SlackIntegrationDocument'
          description: |
            Success.
        '404':
          description: Resource not found or user unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update Slack Integration
      tags:
      - slack-integrations
      x-resource: SlackIntegration
      x-service: tf-api
  /integrations/webhook-deliveries:
    get:
      description: |
        This endpoint returns a list of webhook integration deliveries filtered according to various criteria.
      operationId: list_webhook_integration_deliveries
      parameters:
      - description: Status filter
        in: query
        name: filter[status]
        required: false
        schema:
          type: string
      - description: Response code filter
        in: query
        name: filter[response-code]
        required: false
        schema:
          type: string
      - description: Webhook integration filter
        in: query
        name: filter[webhook-integration]
        required: false
        schema:
          type: string
      - description: 'The triggered-at date filter. Example: `filter[date]=between:2024-01-01T00:00:00Z,2024-02-01T00:00:00Z`'
        in: query
        name: filter[triggered-at]
        required: false
        schema:
          type: string
      - description: Environment filter
        in: query
        name: filter[environment]
        required: false
        schema:
          type: string
      - description: Workspace filter
        in: query
        name: filter[workspace]
        required: false
        schema:
          type: string
      - description: Run filter
        in: query
        name: filter[run]
        required: false
        schema:
          type: string
      - description: Event filter
        in: query
        name: filter[event]
        required: false
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - environment
            - event
            - run
            - triggered-by
            - webhook
            - workspace
            type: string
          type: array
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - event
            - response-code
            - run
            - triggered-at
            - webhook
            type: string
          type: array
      - description: Query string
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            environments:
              description: The comma-separated list of fields to return in response for Environment resource.
              type: string
            event-definitions:
              description: The comma-separated list of fields to return in response for EventDefinition resource.
              type: string
            runs:
              description: The comma-separated list of fields to return in response for Run resource.
              type: string
            users:
              description: The comma-separated list of fields to return in response for User resource.
              type: string
            webhook-integration-deliveries:
              description: The comma-separated list of fields to return in response for WebhookIntegrationDelivery resource.
              type: string
            webhook-integrations:
              description: The comma-separated list of fields to return in response for WebhookIntegration resource.
              type: string
            workspaces:
              description: The comma-separated list of fields to return in response for Workspace resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/WebhookIntegrationDeliveryListingDocument'
          description: Success.
        '404':
          description: User not authorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Webhook Integration Deliveries
      tags:
      - webhook_integration_deliveries
      x-resource: WebhookIntegrationDelivery
      x-service: tf-api
  /integrations/webhook-deliveries/{webhook_delivery}:
    get:
      description: |
        This endpoint returns a single webhook integration delivery.
      operationId: get_webhook_integration_delivery
      parameters:
      - in: path
        name: webhook_delivery
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - environment
            - event
            - run
            - triggered-by
            - webhook
            - workspace
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            environments:
              description: The comma-separated list of fields to return in response for Environment resource.
              type: string
            event-definitions:
              description: The comma-separated list of fields to return in response for EventDefinition resource.
              type: string
            runs:
              description: The comma-separated list of fields to return in response for Run resource.
              type: string
            users:
              description: The comma-separated list of fields to return in response for User resource.
              type: string
            webhook-integration-deliveries:
              description: The comma-separated list of fields to return in response for WebhookIntegrationDelivery resource.
              type: string
            webhook-integrations:
              description: The comma-separated list of fields to return in response for WebhookIntegration resource.
              type: string
            workspaces:
              description: The comma-separated list of fields to return in response for Workspace resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/WebhookIntegrationDeliveryDocument'
          description: Success.
        '404':
          description: User not authorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get Webhook Integration Delivery
      tags:
      - webhook_integration_deliveries
      x-resource: WebhookIntegrationDelivery
      x-service: tf-api
  /integrations/webhooks:
    get:
      description: This endpoint returns a list of webhooks.
      operationId: list_webhook_integrations
      parameters:
      - description: Enabled `true|false` only webhooks
        in: query
        name: filter[enabled]
        required: false
        schema:
          type: string
      - description: The ID of the Account
        in: query
        name: filter[account]
        required: true
        schema:
          type: string
      - description: The environment filter
        in: query
        name: filter[environment]
        required: false
        schema:
          type: string
      - description: The ID of the Event definition
        in: query
        name: filter[event]
        required: false
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - name
            type: string
          type: array
      - description: Query string
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            webhook-integrations:
              description: The comma-separated list of fields to return in response for WebhookIntegration resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/WebhookIntegrationListingDocument'
          description: Success.
        '404':
          description: |-
            Account not found
            or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Webhooks
      tags:
      - webhook-integrations
      x-resource: WebhookIntegration
      x-service: tf-api
    post:
      description: |
        Create a new webhook integration
      operationId: create_webhook_integration
      parameters:
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            webhook-integrations:
              description: The comma-separated list of fields to return in response for WebhookIntegration resource.
              type: string
          type: object
        style: deepObject
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/create-webhook-integration-request.yml
            schema:
              $ref: '#/components/schemas/WebhookIntegrationDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/get-webhook-integration-response.yml
              schema:
                $ref: '#/components/schemas/WebhookIntegrationDocument'
          description: Successfully created.
        '404':
          description: Relationship not found, or user unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create Webhook integration
      tags:
      - webhook-integrations
      x-resource: WebhookIntegration
      x-service: tf-api
  /integrations/webhooks/{webhook}:
    delete:
      description: The endpoint deletes webhook by ID.
      operationId: delete_webhook_integration
      parameters:
      - description: The ID of the webhook to delete.
        in: path
        name: webhook
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Successfully deleted.
        '404':
          description: Webhook not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete a Webhook integration
      tags:
      - webhook-integrations
      x-resource: WebhookIntegration
      x-service: tf-api
    get:
      description: Show details of a specific webhook.
      operationId: get_webhook_integration
      parameters:
      - description: The ID of the webhook.
        in: path
        name: webhook
        required: true
        schema:
          type: string
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            webhook-integrations:
              description: The comma-separated list of fields to return in response for WebhookIntegration resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/get-webhook-integration-response.yml
              schema:
                $ref: '#/components/schemas/WebhookIntegrationDocument'
          description: Success.
        '404':
          description: Webhook not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get a Webhook
      tags:
      - webhook-integrations
      x-resource: WebhookIntegration
      x-service: tf-api
    patch:
      description: This endpoint updates webhook by ID.
      operationId: update_webhook_integration
      parameters:
      - description: |
          The ID of the webhook to update.
        in: path
        name: webhook
        required: true
        schema:
          type: string
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            webhook-integrations:
              description: The comma-separated list of fields to return in response for WebhookIntegration resource.
              type: string
          type: object
        style: deepObject
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/update-webhook-integration-request.yml
            schema:
              $ref: '#/components/schemas/WebhookIntegrationDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/WebhookIntegrationDocument'
          description: Successfully updated.
        '404':
          description: Webhook or relationship not found, or user unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update Webhook integration
      tags:
      - webhook-integrations
      x-resource: WebhookIntegration
      x-service: tf-api
  /logout:
    get:
      description: |
        Destroys user's session.
        In case of the SAML additionally performs SAML logout action.
      operationId: logout
      parameters: []
      responses:
        '307':
          description: Redirects to the login page.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Logout the user
      tags:
      - logout
      x-resource: null
      x-service: tf-api
  /metrics:
    get:
      operationId: get_open_metrics
      parameters: []
      responses:
        '200':
          description: Success.
        '404':
          description: Account or relationship not found, or user unauthorized to perform an action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Shows Account Metrics in OpenMetrics format
      tags:
      - metrics
      x-resource: null
      x-service: tf-api
  /module-namespaces:
    get:
      description: |
        This endpoint lists module namespaces by various filters.

        To list module namespaces accessible from a certain environment, `filter[environment]` has to be
        specified. Module namespaces from the account which this environment belongs to will be listed as well.

        To list module namespaces accessible from a certain account, `filter[account]` has to be specified.

        If no filters were specified, all module namespaces which the user has read access to will be
        listed.
      operationId: list_module_namespaces
      parameters:
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: Filter module namespaces by name
        in: query
        name: filter[name]
        required: false
        schema:
          type: string
      - description: Filter module namespaces by environment
        in: query
        name: filter[environment]
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - name
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ModuleNamespaceListingDocument'
          description: Success.
        '404':
          description: Module namespaces not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Module Namespaces
      tags:
      - module-namespaces
      x-resource: ModuleNamespace
      x-service: tf-api
    post:
      description: Create a new module namespace.
      operationId: create_module_namespace
      parameters: []
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/ModuleNamespaceDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ModuleNamespaceDocument'
          description: Success.
        '403':
          description: User unauthorized to perform action.
        '404':
          description: Relationship resource not found, or user unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create a Module Namespace
      tags:
      - module-namespaces
      x-resource: ModuleNamespace
      x-service: tf-api
  /module-namespaces/{module_namespace}:
    delete:
      description: Delete a module namespace.
      operationId: delete_module_namespace
      parameters:
      - description: The ID of the module namespace to delete.
        in: path
        name: module_namespace
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Success.
        '403':
          description: User unauthorized to perform action or namespace is autocreated default.
        '404':
          description: Module namespace not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete a Module Namespace
      tags:
      - module-namespaces
      x-resource: ModuleNamespace
      x-service: tf-api
    get:
      description: Show details of a specific module namespace.
      operationId: get_module_namespace
      parameters:
      - description: The ID of the module namespace to show.
        in: path
        name: module_namespace
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ModuleNamespaceDocument'
          description: Success.
        '404':
          description: Module namespace not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get a Module Namespace
      tags:
      - module-namespaces
      x-resource: ModuleNamespace
      x-service: tf-api
    patch:
      description: Update an existing module namespace.
      operationId: update_module_namespace
      parameters:
      - description: The ID of the module namespace to update.
        in: path
        name: module_namespace
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/ModuleNamespaceDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ModuleNamespaceDocument'
          description: Success.
        '403':
          description: User unauthorized to perform action.
        '404':
          description: Module namespace not found or user unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update a Module Namespace
      tags:
      - module-namespaces
      x-resource: ModuleNamespace
      x-service: tf-api
  /module-test-provider-configuration-links/{module_test_provider_configuration_link}:
    delete:
      description: |
        The endpoint deletes a Module Test Provider Configuration Link by ID.
      operationId: delete_module_test_provider_configuration_link
      parameters:
      - description: |
          The ID of the Module Test Provider Configuration Link to delete.
        in: path
        name: module_test_provider_configuration_link
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Deleted.
        '404':
          description: Module Test Provider Configuration Link not found or user unauthorized.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete a Module Test Provider Configuration Link
      tags:
      - module-test-provider-configuration-links
      x-resource: ModuleTestProviderConfigurationLink
      x-service: tf-api
    get:
      description: |
        Show details of a specific Module Test Provider Configuration Link.
      operationId: get_module_test_provider_configuration_link
      parameters:
      - description: |
          The ID of the Module Test Provider Configuration Link.
        in: path
        name: module_test_provider_configuration_link
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - provider-configuration
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ModuleTestProviderConfigurationLinkDocument'
          description: Success.
        '404':
          description: Module Test Provider Configuration Link not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get a Module Test Provider Configuration Link
      tags:
      - module-test-provider-configuration-links
      x-resource: ModuleTestProviderConfigurationLink
      x-service: tf-api
    patch:
      description: |
        This endpoint allows updates to attributes of an existing Module Test Provider Configuration Link.
      operationId: update_module_test_provider_configuration_link
      parameters:
      - description: |
          The ID of the Module Test Provider Configuration Link to update.
        in: path
        name: module_test_provider_configuration_link
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/ModuleTestProviderConfigurationLinkDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ModuleTestProviderConfigurationLinkDocument'
          description: Updated.
        '403':
          description: User unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update a Module Test Provider Configuration Link
      tags:
      - module-test-provider-configuration-links
      x-resource: ModuleTestProviderConfigurationLink
      x-service: tf-api
  /module-versions:
    get:
      description: |
        This endpoint lists versions of a particular module.
        The query parameter `filter[module]` with Module ID is required.
      operationId: list_module_versions
      parameters:
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: Filter module versions by module
        in: query
        name: filter[module]
        required: true
        schema:
          type: string
      - description: Filter module versions by status
        in: query
        name: filter[status]
        required: false
        schema:
          type: string
      - description: Filter module versions by semantic version
        in: query
        name: filter[version]
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - version
            type: string
          type: array
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - module
            - vcs-revision
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            module-versions:
              description: The comma-separated list of fields to return in response for ModuleVersion resource.
              type: string
            modules:
              description: The comma-separated list of fields to return in response for Module resource.
              type: string
            vcs-revisions:
              description: The comma-separated list of fields to return in response for VcsRevision resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/get-module-versions.yml
              schema:
                $ref: '#/components/schemas/ModuleVersionListingDocument'
          description: Success.
        '404':
          description: Module versions not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Module Versions
      tags:
      - modules
      x-resource: ModuleVersion
      x-service: tf-api
  /module-versions/{module_version}:
    get:
      description: Show details of a specific terraform module version.
      operationId: get_module_version
      parameters:
      - description: The ID of the module version to show.
        in: path
        name: module_version
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - module
            - vcs-revision
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/get-module-version.yml
              schema:
                $ref: '#/components/schemas/ModuleVersionDocument'
          description: Success.
        '404':
          description: Module version not found or user unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get a Module Version
      tags:
      - modules
      x-resource: ModuleVersion
      x-service: tf-api
  /module-versions/{module_version}/actions/resync:
    post:
      description: |
        Trigger resync of the Module Version associated with the `relationships.vcs-revision`.
        Only modules associated with a VCS can be resynchronized.
      operationId: resync_module_version
      parameters:
      - in: path
        name: module_version
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Successfully triggered resync of the module version.
        '409':
          description: Module Version not bound to the VCS repository or another sync in progress.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Resync a Module Version
      tags:
      - modules
      x-resource: ModuleVersion
      x-service: tf-api
  /modules:
    get:
      description: |
        This endpoint lists modules by various filters.

        To list modules accessible from a certain environment, `filter[environment]` has to be
        specified. Modules from the account which this environment belongs as well as
        globally published modules will be listed as well.

        To list modules accessible from a certain account, `filter[account]` has to be specified.
        Modules published globally will be listed as well.

        To list modules accessible globally, both `filter[account]=null` and
        `filter[environment]=null` have to be specified.

        If no filters were specified, all modules which the user has read access to will be
        listed.
      operationId: list_modules
      parameters:
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: Filter modules by name
        in: query
        name: filter[name]
        required: false
        schema:
          type: string
      - description: Filter modules by provider
        in: query
        name: filter[provider]
        required: false
        schema:
          type: string
      - description: Filter modules by source
        in: query
        name: filter[source]
        required: false
        schema:
          type: string
      - description: Filter modules by status
        in: query
        name: filter[status]
        required: false
        schema:
          type: string
      - description: Filter modules by environment
        in: query
        name: filter[environment]
        required: false
        schema:
          type: string
      - description: Filter modules by account
        in: query
        name: filter[account]
        required: false
        schema:
          type: string
      - description: Filter modules by module-version status
        in: query
        name: filter[module-versions][status]
        required: false
        schema:
          type: string
      - description: Filter modules by module-version is-root-module
        in: query
        name: filter[module-versions][is-root-module]
        required: false
        schema:
          type: string
      - description: The ID of the VCS provider
        in: query
        name: filter[vcs-provider]
        required: false
        schema:
          type: string
      - description: Query string, search by id, name, provider, and submodules recursively
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: Filter modules by namespace
        in: query
        name: filter[module-namespace]
        required: false
        schema:
          type: string
      - description: Filter modules by namespace environments
        in: query
        name: filter[namespace][environments]
        required: false
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - created-by
            - environment
            - latest-module-version
            - module-versions
            - namespace
            - vcs-provider
            type: string
          type: array
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - created-at
            - environment
            - name
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            environments:
              description: The comma-separated list of fields to return in response for Environment resource.
              type: string
            module-namespaces:
              description: The comma-separated list of fields to return in response for ModuleNamespace resource.
              type: string
            module-versions:
              description: The comma-separated list of fields to return in response for ModuleVersion resource.
              type: string
            modules:
              description: The comma-separated list of fields to return in response for Module resource.
              type: string
            users:
              description: The comma-separated list of fields to return in response for User resource.
              type: string
            vcs-providers:
              description: The comma-separated list of fields to return in response for VcsProvider resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/get-modules.yml
              schema:
                $ref: '#/components/schemas/ModuleListingDocument'
          description: Success.
        '404':
          description: Modules not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Modules
      tags:
      - modules
      x-mcp-tool: true
      x-resource: Module
      x-service: tf-api
    post:
      description: |
        This endpoint creates a Module from a VCS repository.

        The module's source code directory should follow the
        [standard module structure](https://www.terraform.io/docs/language/modules/develop/structure.html).

        Scalr extracts various meta information from the module's source:
        * It's important to provide each `variable` and `output` blocks with a meaningful descriptions, as they
        will be displayed in a Module and Workspace Variables pages for your internal users.
        * README or README.md file will be displayed on a Module page.
        * Nested modules from `modules/` directory will be searchable and available though the Registry just
        like top-level modules.

        Modules can be published on both `account` and `environment` scopes.
        If neither scope is specified in the request body, the module will be published in the
        same scope that the related `vcs-provider` is published.
      operationId: create_module
      parameters: []
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              0-repo-with-mod:
                $ref: examples/create-module-request-repo-with-mod.yml
              1-mod-in-subdir:
                $ref: examples/create-module-request-mod-in-a-subdirectory.yml
              2-mono-repo-package:
                $ref: examples/create-module-request-mono-repo-package.yml
              3-mono-repo-nss:
                $ref: examples/create-module-request-mono-repo-with-tag-namespaces.yml
            schema:
              $ref: '#/components/schemas/ModuleDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/create-module-response.yml
              schema:
                $ref: '#/components/schemas/ModuleDocument'
          description: Successfully created module.
        '403':
          description: User unauthorized to perform action.
        '404':
          description: Relationship resource not found, or user unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Publish a Module
      tags:
      - modules
      x-resource: Module
      x-service: tf-api
  /modules/{module}:
    delete:
      description: |
        This endpoint removes the module from the registry.
      operationId: delete_module
      parameters:
      - description: |
          The ID of the module.
        in: path
        name: module
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Success.
        '403':
          description: Module is in use and can not be removed.
        '404':
          description: Module not found or user unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Unpublish a Module
      tags:
      - modules
      x-resource: Module
      x-service: tf-api
    get:
      description: Show details of a specific terraform module.
      operationId: get_module
      parameters:
      - description: The ID of the module to show.
        in: path
        name: module
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - created-by
            - environment
            - latest-module-version
            - module-versions
            - namespace
            - vcs-provider
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/get-module.yml
              schema:
                $ref: '#/components/schemas/ModuleDocument'
          description: Success.
        '404':
          description: Module not found or user unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get a Module
      tags:
      - modules
      x-mcp-tool: true
      x-resource: Module
      x-service: tf-api
  /modules/{module}/actions/resync:
    post:
      description: Trigger resync of the Module associated with the VCS repository.
      operationId: resync_module
      parameters:
      - description: |
          The ID of the module to resync.
        in: path
        name: module
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModuleResyncRequest'
      responses:
        '204':
          description: Success.
        '404':
          description: Module not found or user unauthorized to perform action.
        '409':
          description: Module not bound to the VCS repository or another sync in progress.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Resync a Module
      tags:
      - modules
      x-resource: Module
      x-service: tf-api
  /modules/{module}/changelog:
    get:
      description: Returns the changelog content for the module.
      operationId: get_module_changelog
      parameters:
      - in: path
        name: module
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Changelog content (text/markdown).
        '404':
          description: Module not found, unauthorized, or module has no changelog.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Module Changelog
      tags:
      - modules
      x-resource: Module
      x-service: tf-api
  /permissions:
    get:
      description: |-
        This endpoint returns a list of all Scalr [IAM](/docs/identity-and-access-management) permissions,
        available to use in a [Role](/docs/identity-and-access-management#roles) resource.
      operationId: get_permissions
      parameters: []
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/list-permissions.yml
              schema:
                $ref: '#/components/schemas/PermissionListingDocument'
          description: Success.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Permissions
      tags:
      - permissions
      x-mcp-tool: true
      x-resource: Permission
      x-service: tf-api
  /permissions/{permission}:
    get:
      description: Show details of a specific Scalr IAM Permission.
      operationId: get_permission
      parameters:
      - description: The ID of the permission.
        in: path
        name: permission
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/PermissionDocument'
          description: Success.
        '404':
          description: Permission not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get a Permission
      tags:
      - permissions
      x-mcp-tool: true
      x-resource: Permission
      x-service: tf-api
  /ping:
    get:
      description: Checks the connection to the API server
      operationId: ping
      parameters: []
      responses:
        '200':
          description: Alive
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Ping
      tags:
      - ping
      x-resource: null
      x-service: tf-api
  /plans/{plan}:
    get:
      description: Show details of a specific Terraform Plan stage.
      operationId: get_plan
      parameters:
      - description: The ID of the plan.
        in: path
        name: plan
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/get-plan.yml
              schema:
                $ref: '#/components/schemas/PlanDocument'
          description: Success.
        '403':
          description: Plan not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get a Plan
      tags:
      - plans
      x-resource: Plan
      x-service: tf-api
  /plans/{plan}/json-output:
    get:
      description: Download JSON formatted execution plan.
      operationId: get_json_output
      parameters:
      - description: |-
          The ID of the plan. Obtain it from the
          [Get a Run](get_run) endpoint.
        in: path
        name: plan
        required: true
        schema:
          type: string
      - description: Format of the response.
        in: query
        name: format
        required: false
        schema:
          enum:
          - text
          - gzip
          type: string
      responses:
        '200':
          description: Terraform json plan.
        '204':
          description: Plan has not yet completed.
        '404':
          description: Plan not found or user unauthorized to perform action.
        '413':
          description: Plan cannot be served due to size limitations.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: JSON Output
      tags:
      - plans
      x-resource: Plan
      x-service: tf-api
  /plans/{plan}/output:
    get:
      description: Download the raw output of the terraform plan stage.
      operationId: get_plan_log
      parameters:
      - description: |-
          The ID of the plan. Obtain it from the
          [Get a Run](get_run) endpoint.
        in: path
        name: plan
        required: true
        schema:
          type: string
      - description: Strip ANSI escape codes.
        in: query
        name: clean
        required: false
        schema:
          default: false
          type: boolean
      - description: Format of the response.
        in: query
        name: format
        required: false
        schema:
          enum:
          - text
          - gzip
          type: string
      responses:
        '200':
          description: Plan log.
        '204':
          description: Plan has not completed yet or can't be served.
        '302':
          description: The location of the temporary download link.
        '404':
          description: Plan not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Plan Log
      tags:
      - plans
      x-mcp-tool: true
      x-resource: Plan
      x-service: tf-api
  /plans/{plan}/sanitized-json-output:
    get:
      description: Download plan file in machine-readable format with sanitized sensitive values.
      operationId: get_sanitized_json_output
      parameters:
      - description: |-
          The ID of the plan. Obtain it from the
          [Get a Run](get_run) endpoint.
        in: path
        name: plan
        required: true
        schema:
          type: string
      - description: Format of the response.
        in: query
        name: format
        required: false
        schema:
          enum:
          - text
          - gzip
          type: string
      responses:
        '200':
          description: Sanitized terraform json plan.
        '204':
          description: Plan has not yet completed or can't be served.
        '307':
          description: |-
            Redirects to JSON Output if the API server is not sure
            that the plan can be correctly sanitized and a user permissions
            allow to read sensitive plan values.
        '404':
          description: Plan not found or user unauthorized to perform action or Blob object not found.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Sanitized JSON Output
      tags:
      - plans
      x-resource: Plan
      x-service: tf-api
  /policies/{policy}:
    get:
      description: Show details of a specific OPA policy.
      operationId: get_policy
      parameters:
      - description: The ID of the policy to show.
        in: path
        name: policy
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/PolicyDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: User not authorized or policy not found.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get a Policy
      tags:
      - policies
      x-resource: Policy
      x-service: tf-api
  /policy-checks/{policy_check}:
    get:
      description: Show details of a specific Terraform policy check stage.
      operationId: get_policy_check
      parameters:
      - description: The ID of the policy check.
        in: path
        name: policy_check
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/get-policy-check.yml
              schema:
                $ref: '#/components/schemas/PolicyCheckDocument'
          description: Success.
        '403':
          description: Policy check not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get a Policy Check
      tags:
      - policy-checks
      x-resource: PolicyCheck
      x-service: tf-api
  /policy-checks/{policy_check}/actions/override:
    post:
      description: This endpoint overrides a soft-mandatory policy.
      operationId: override_policy
      parameters:
      - description: The ID of the policy check to override.
        in: path
        name: policy_check
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/get-policy-check-overridden.yml
              schema:
                $ref: '#/components/schemas/PolicyCheckDocument'
          description: Success.
        '404':
          description: Policy check not found or user unauthorized to perform action.
        '409':
          description: Override is not possible in a current policy check status.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Override Policy
      tags:
      - policy-checks
      x-resource: PolicyCheck
      x-service: tf-api
  /policy-checks/{policy_check}/output:
    get:
      description: Download the raw output of the OPA policy check stage.
      operationId: get_policy_checks_log
      parameters:
      - description: |-
          The ID of the policy check. Obtain it from the
          [Get a Run](get_run) endpoint.
        in: path
        name: policy_check
        required: true
        schema:
          type: string
      - description: Strip ANSI escape codes.
        in: query
        name: clean
        required: false
        schema:
          default: false
          type: boolean
      responses:
        '302':
          description: The location of the temporary download link.
        '404':
          description: Policy check not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Policy Check Log
      tags:
      - policy-checks
      x-resource: PolicyCheck
      x-service: tf-api
  /policy-group-checks/{policy_group_check}/policy-check-results:
    get:
      description: |
        List policy check results for a specific policy group check.

        Required permission: policy_groups:read
      operationId: get_policy_group_check_results
      parameters:
      - description: The query string to search for.
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: 'The policy name filter. Example: `filter[policy]=workspace_name`'
        in: query
        name: filter[policy]
        required: false
        schema:
          type: string
      - description: 'The date range filter. Example: `filter[date]=between:2022-01-01T00:00:00Z,2022-02-01T00:00:00Z`'
        in: query
        name: filter[date]
        required: false
        schema:
          type: string
      - description: 'The result of the policy check filter. Example: `filter[result]=hard-failed`'
        in: query
        name: filter[result]
        required: false
        schema:
          type: string
      - description: 'The environment ID to list policy check results for. Example: `filter[environment]=env-123456`'
        in: query
        name: filter[environment]
        required: false
        schema:
          type: string
      - description: 'The workspace ID to list policy check results for. Example: `filter[workspace]=ws-123456`'
        in: query
        name: filter[workspace]
        required: false
        schema:
          type: string
      - description: 'The unit path filter. Example: `filter[unit_path]=vpc`'
        in: query
        name: filter[terragrunt-unit]
        required: false
        schema:
          type: string
      - in: path
        name: policy_group_check
        required: true
        schema:
          type: string
      - description: Format of the response. It can be 'json' or 'csv'.
        in: query
        name: format
        required: false
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - environment
            - workspace
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            environments:
              description: The comma-separated list of fields to return in response for Environment resource.
              type: string
            policy-check-results:
              description: The comma-separated list of fields to return in response for PolicyCheckResult resource.
              type: string
            workspaces:
              description: The comma-separated list of fields to return in response for Workspace resource.
              type: string
          type: object
        style: deepObject
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - name
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/PolicyCheckResultListingDocument'
            text/csv:
              schema:
                format: csv
                type: string
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Policy group check not found.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Policy Group Check results
      tags:
      - policy-group-checks
      x-resource: PolicyCheckResult
      x-service: tf-api
  /policy-groups:
    get:
      description: This endpoint returns a list of [policy groups](/docs/policy-governance#open-policy-agent).
      operationId: list_policy_groups
      parameters:
      - description: Filter by policy group id
        in: query
        name: filter[policy-group]
        required: false
        schema:
          type: string
      - description: Environment filter
        in: query
        name: filter[environment]
        required: false
        schema:
          type: string
      - description: The ID of the software version
        in: query
        name: filter[software-version]
        required: false
        schema:
          type: string
      - description: The ID of the VCS provider
        in: query
        name: filter[vcs-provider]
        required: false
        schema:
          type: string
      - description: The policy group name filter.
        in: query
        name: filter[name]
        required: false
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - account
            - policies
            - vcs-provider
            - vcs-revision
            type: string
          type: array
      - description: Query string
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - account
            - created-at
            - name
            - status
            type: string
          type: array
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            accounts:
              description: The comma-separated list of fields to return in response for Account resource.
              type: string
            policies:
              description: The comma-separated list of fields to return in response for Policy resource.
              type: string
            policy-groups:
              description: The comma-separated list of fields to return in response for PolicyGroup resource.
              type: string
            vcs-providers:
              description: The comma-separated list of fields to return in response for VcsProvider resource.
              type: string
            vcs-revisions:
              description: The comma-separated list of fields to return in response for VcsRevision resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/list-policy-groups.yml
              schema:
                $ref: '#/components/schemas/PolicyGroupListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Policy Groups
      tags:
      - policy-groups
      x-mcp-tool: true
      x-resource: PolicyGroup
      x-service: tf-api
    post:
      description: Create a new [policy group](/docs/policy-governance#open-policy-agent) in the account.
      operationId: create_policy_group
      parameters:
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - account
            - policies
            - vcs-provider
            - vcs-revision
            type: string
          type: array
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/create-policy-group-request.yml
            schema:
              $ref: '#/components/schemas/PolicyGroupDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/create-policy-group-response.yml
              schema:
                $ref: '#/components/schemas/PolicyGroupDocument'
          description: Successfully created.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Relationship not found or user unauthorized to perform action.
        '409':
          description: Quota exceeded error.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create a Policy Group
      tags:
      - policy-groups
      x-resource: PolicyGroup
      x-service: tf-api
  /policy-groups/{policy_group}:
    delete:
      description: |
        This endpoint deletes a [policy group](/docs/policy-governance#open-policy-agent) by ID.
        Only an unused policy group (that is not linked to any environment) can be removed.
      operationId: delete_policy_group
      parameters:
      - description: The ID of the policy group to delete.
        in: path
        name: policy_group
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Deleted.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Policy group not found or user unauthorized to perform action.
        '409':
          description: Can't be deleted. The policy group is in use.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete a Policy Group
      tags:
      - policy-groups
      x-resource: PolicyGroup
      x-service: tf-api
    get:
      description: Show details of a specific [policy group](/docs/policy-governance#open-policy-agent).
      operationId: get_policy_group
      parameters:
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - account
            - policies
            - vcs-provider
            - vcs-revision
            type: string
          type: array
      - description: The ID of the policy group to show.
        in: path
        name: policy_group
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/PolicyGroupDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: User not authorized or policy group not found.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get a Policy Group
      tags:
      - policy-groups
      x-mcp-tool: true
      x-resource: PolicyGroup
      x-service: tf-api
    patch:
      description: |
        This endpoint updates a [policy group](/docs/policy-governance#open-policy-agent) by ID.
      operationId: update_policy_group
      parameters:
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - account
            - policies
            - vcs-provider
            - vcs-revision
            type: string
          type: array
      - description: The ID of the policy group to update.
        in: path
        name: policy_group
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/PolicyGroupDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/PolicyGroupDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: |
            Policy group or relationship not found, or user unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update a Policy Group
      tags:
      - policy-groups
      x-resource: PolicyGroup
      x-service: tf-api
  /policy-groups/{policy_group}/actions/resync:
    post:
      description: |
        This endpoint resyncs a [policy group](/docs/policy-governance#open-policy-agent).
      operationId: resync_policy_group
      parameters:
      - description: The ID of the policy group to resync.
        in: path
        name: policy_group
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Policy group not found, or user unauthorized to perform action.
        '409':
          description: Sync in progress.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Resync a Policy Group
      tags:
      - policy-groups
      x-resource: PolicyGroup
      x-service: tf-api
  /policy-groups/{policy_group}/pull-request-policy-check-results:
    get:
      operationId: list_pull_request_policy_check_results
      parameters:
      - description: The ID of the policy group to get pull requests for.
        in: path
        name: policy_group
        required: true
        schema:
          type: string
      - description: The environment ID to list policy check results for.
        in: query
        name: filter[environment]
        required: false
        schema:
          type: string
      - description: The workspace ID to list policy check results for.
        in: query
        name: filter[workspace]
        required: false
        schema:
          type: string
      - description: Filter results by status.
        in: query
        name: filter[result]
        required: false
        schema:
          type: string
      - description: Filter results by commit SHA.
        in: query
        name: commit_sha
        required: false
        schema:
          type: string
      - description: Query string
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: 'The unit path filter. Example: `filter[unit_path]=vpc`'
        in: query
        name: filter[terragrunt-unit]
        required: false
        schema:
          type: string
      - description: Format of the response. It can be 'json' or 'csv'.
        in: query
        name: format
        required: false
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - name
            - pull-request-number
            - result
            type: string
          type: array
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - environment
            - workspace
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            environments:
              description: The comma-separated list of fields to return in response for Environment resource.
              type: string
            policy-check-results:
              description: The comma-separated list of fields to return in response for PolicyCheckResult resource.
              type: string
            workspaces:
              description: The comma-separated list of fields to return in response for Workspace resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/PolicyCheckResultListingDocument'
            text/csv:
              schema:
                format: csv
                type: string
          description: Successfully listed preview results.
        '404':
          description: Policy Group not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List of policy group check results for pull requests.
      tags:
      - policy-groups
      x-mcp-tool: true
      x-resource: PolicyGroup
      x-service: tf-api
  /policy-groups/{policy_group}/relationships/environments:
    patch:
      operationId: update_policy_group_environments
      parameters:
      - description: The ID of the policy_group to update.
        in: path
        name: policy_group
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/update-policy-group-environments-request-body.yml
            schema:
              $ref: '#/components/schemas/PolicyGroupEnvironmentRelationshipFieldsetsListingDocument'
      responses:
        '204':
          description: Successfully updated the policy group environments relationships.
        '404':
          description: Environments or policy group not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update policy group environments relationships
      tags:
      - policy-group-environments
      x-resource: PolicyGroup
      x-service: tf-api
    post:
      operationId: create_policy_group_environments
      parameters:
      - description: The ID of the policy_group to update.
        in: path
        name: policy_group
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/create-policy-group-environments-request-body.yml
            schema:
              $ref: '#/components/schemas/PolicyGroupEnvironmentRelationshipFieldsetsListingDocument'
      responses:
        '204':
          description: Successfully created the policy group environments relationships.
        '404':
          description: Environments or policy group not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create policy group environments relationships
      tags:
      - policy-group-environments
      x-resource: PolicyGroup
      x-service: tf-api
  /policy-groups/{policy_group}/relationships/environments/{environment}:
    delete:
      operationId: delete_policy_group_environments
      parameters:
      - description: The ID of the policy group.
        in: path
        name: policy_group
        required: true
        schema:
          type: string
      - description: The ID of the environment to be unlinked from policy group.
        in: path
        name: environment
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Successfully deleted the policy group's environment relationship.
        '404':
          description: Environment or policy group not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete policy group's environment relationship
      tags:
      - policy-group-environments
      x-resource: PolicyGroup
      x-service: tf-api
  /provider-configuration-links/{provider_configuration_link}:
    delete:
      description: |
        The endpoint deletes a Provider configuration workspace link by ID.
      operationId: delete_provider_configuration_workspace_link
      parameters:
      - description: |
          The ID of the Provider configuration link to delete.
        in: path
        name: provider_configuration_link
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Deleted.
        '404':
          description: Provider configuration link not found or user unauthorized.
        '422':
          description: The ID of environment link is specified.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete a Provider configuration workspace link
      tags:
      - provider-configuration-links
      x-resource: ProviderConfigurationLink
      x-service: tf-api
    get:
      description: |
        Show details of a specific Provider configuration link.
      operationId: get_provider_configuration_link
      parameters:
      - description: |
          The ID of the Provider configuration link.
        in: path
        name: provider_configuration_link
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ProviderConfigurationLinkDocument'
          description: Success.
        '404':
          description: Provider configuration link not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get a Provider configuration link
      tags:
      - provider-configuration-links
      x-resource: ProviderConfigurationLink
      x-service: tf-api
    patch:
      description: |
        This endpoint allows updates to attributes of an existing Provider configuration link.
      operationId: update_provider_configuration_link
      parameters:
      - description: |
          The ID of the Provider configuration link to update.
        in: path
        name: provider_configuration_link
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/ProviderConfigurationLinkDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ProviderConfigurationLinkDocument'
          description: Updated.
        '403':
          description: User unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.) or the ID of environment link is specified.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update a Provider configuration link
      tags:
      - provider-configuration-links
      x-resource: ProviderConfigurationLink
      x-service: tf-api
  /provider-configuration-parameters/{provider_configuration_parameter}:
    delete:
      description: The endpoint deletes a Provider configuration parameter by ID.
      operationId: delete_provider_configuration_parameter
      parameters:
      - description: |
          The ID of the Provider configuration parameter to delete.
        in: path
        name: provider_configuration_parameter
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Deleted.
        '404':
          description: Provider configuration parameter not found or user unauthorized.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete a Provider configuration parameter
      tags:
      - provider-configuration-params
      x-resource: ProviderConfigurationParameter
      x-service: tf-api
    get:
      description: |
        Show details of a specific Provider configuration parameter.
      operationId: get_provider_configuration_parameter
      parameters:
      - description: |
          The ID of the Provider configuration parameter.
        in: path
        name: provider_configuration_parameter
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ProviderConfigurationParameterDocument'
          description: Success.
        '404':
          description: Provider configuration parameter not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get a Provider configuration parameter
      tags:
      - provider-configuration-params
      x-resource: ProviderConfigurationParameter
      x-service: tf-api
    patch:
      description: |
        This endpoint allows updates to attributes of an existing Provider configuration parameters.
      operationId: update_provider_configuration_parameter
      parameters:
      - description: |
          The ID of the Provider configuration parameter to update.
        in: path
        name: provider_configuration_parameter
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/ProviderConfigurationParameterDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ProviderConfigurationParameterDocument'
          description: Updated.
        '403':
          description: User unauthorized to perform action.
        '404':
          description: Relationship resource not found, or user unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update a Provider configuration parameter
      tags:
      - provider-configuration-params
      x-resource: ProviderConfigurationParameter
      x-service: tf-api
  /provider-configurations:
    get:
      description: |
        This endpoint returns a list of Provider configurations by various filters.
      operationId: list_provider_configurations
      parameters:
      - description: The provider configuration name filter.
        in: query
        name: filter[name]
        required: false
        schema:
          type: string
      - description: The provider configuration type filter.
        in: query
        name: filter[provider-name]
        required: false
        schema:
          type: string
      - description: The provider configuration status filter.
        in: query
        name: filter[status]
        required: false
        schema:
          type: string
      - description: The provider configuration account filter.
        in: query
        name: filter[account]
        required: false
        schema:
          type: string
      - description: The provider configuration environment filter.
        in: query
        name: filter[environment]
        required: false
        schema:
          type: string
      - description: The ID(s) of provider configuration(s).
        in: query
        name: filter[provider-configuration]
        required: false
        schema:
          type: string
      - description: Filter provider configurations by tags
        in: query
        name: filter[tag]
        required: false
        schema:
          type: string
      - description: Filter provider configurations allowed for use in module tests.
        in: query
        name: filter[is-allowed-in-module-test]
        required: false
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - name
            type: string
          type: array
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - environments
            - parameters
            - tags
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            environments:
              description: The comma-separated list of fields to return in response for Environment resource.
              type: string
            provider-configuration-parameters:
              description: The comma-separated list of fields to return in response for ProviderConfigurationParameter resource.
              type: string
            provider-configurations:
              description: The comma-separated list of fields to return in response for ProviderConfiguration resource.
              type: string
            tags:
              description: The comma-separated list of fields to return in response for Tag resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ProviderConfigurationListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Provider configurations
      tags:
      - provider-configurations
      x-resource: ProviderConfiguration
      x-service: tf-api
    post:
      description: |
        Create a new Provider configuration.
      operationId: create_provider_configuration
      parameters: []
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/ProviderConfigurationDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ProviderConfigurationDocument'
          description: Created.
        '403':
          description: User unauthorized to perform action.
        '404':
          description: Relationship resource not found, or user unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create a Provider configuration
      tags:
      - provider-configurations
      x-resource: ProviderConfiguration
      x-service: tf-api
  /provider-configurations/{provider_configuration}:
    delete:
      description: The endpoint deletes a Provider configuration by ID.
      operationId: delete_provider_configuration
      parameters:
      - description: The ID of the Provider configuration
        in: path
        name: provider_configuration
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Deleted.
        '404':
          description: Provider configuration not found or user unauthorized.
        '422':
          description: |-
            Some of environments cant be detached.
            The environment cant be detached if some of the environment workspaces use this provider configuration.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete a Provider configuration
      tags:
      - provider-configurations
      x-resource: ProviderConfiguration
      x-service: tf-api
    get:
      description: Show details of a specific Provider configuration.
      operationId: get_provider_configuration
      parameters:
      - description: The ID of the Provider configuration.
        in: path
        name: provider_configuration
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - environments
            - parameters
            - tags
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ProviderConfigurationDocument'
          description: Success.
        '404':
          description: Provider configuration not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get a Provider configuration
      tags:
      - provider-configurations
      x-resource: ProviderConfiguration
      x-service: tf-api
    patch:
      description: |
        This endpoint updates attributes of an existing Provider configuration.
      operationId: update_provider_configuration
      parameters:
      - description: |
          The ID of the Provider configuration to update.
        in: path
        name: provider_configuration
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/ProviderConfigurationDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ProviderConfigurationDocument'
          description: Updated.
        '403':
          description: User unauthorized to perform action.
        '404':
          description: Relationship resource not found, or user unauthorized to perform action.
        '422':
          description: |-
            Malformed request body (missing attributes, wrong types, etc.) or some of environments cant be detached.
            The environment cant be detached if some of the environment workspaces use this provider configuration.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update a Provider configuration
      tags:
      - provider-configurations
      x-resource: ProviderConfiguration
      x-service: tf-api
  /provider-configurations/{provider_configuration}/parameters:
    get:
      description: |
        This endpoint returns a list of Provider configuration parameters for specific provider configuration.
      operationId: list_provider_configuration_parameters
      parameters:
      - description: |
          The ID of the Provider configuration.
        in: path
        name: provider_configuration
        required: true
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ProviderConfigurationParameterListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform action.
        '404':
          description: Provider configuration not found.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Provider configuration parameters for specific provider configurations
      tags:
      - provider-configuration-params
      x-resource: ProviderConfigurationParameter
      x-service: tf-api
    post:
      description: |
        Create a new Provider configuration parameter.
      operationId: create_provider_configuration_parameter
      parameters:
      - description: |
          The ID of the Provider configuration.
        in: path
        name: provider_configuration
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/ProviderConfigurationParameterDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ProviderConfigurationParameterDocument'
          description: Created.
        '403':
          description: User unauthorized to perform action.
        '404':
          description: Provider configuration not found.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.) or parameter cant be created for this
            provider.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create a Provider configuration parameter
      tags:
      - provider-configuration-params
      x-resource: ProviderConfigurationParameter
      x-service: tf-api
  /provider-configurations/{provider_configuration}/relationships/tags:
    delete:
      description: |
        This endpoint removes given [tags](/docs/tags-1) from the provider configuration.
      operationId: delete_provider_configuration_tags
      parameters:
      - description: |
          The provider configuration whose tags will be deleted.
        in: path
        name: provider_configuration
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/update-resource-tags-request.yml
            schema:
              $ref: '#/components/schemas/TagRelationshipFieldsetsListingDocument'
      responses:
        '204':
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete provider configuration's tags
      tags:
      - provider-configurations
      x-resource: ProviderConfiguration
      x-service: tf-api
    get:
      description: |
        This endpoint returns a list of [tags](/docs/tags-1),
        assigned to an provider configuration.
      operationId: list_provider_configuration_tags
      parameters:
      - description: The ID of the Provider configuration
        in: path
        name: provider_configuration
        required: true
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/list-provider-configurations-tags-response.yml
              schema:
                $ref: '#/components/schemas/TagRelationshipFieldsetsListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List provider configuration's tags
      tags:
      - provider-configurations
      x-resource: ProviderConfiguration
      x-service: tf-api
    patch:
      description: |
        This endpoint completely replaces provider configuration's tags with provided list.
      operationId: replace_provider_configuration_tags
      parameters:
      - description: |
          The provider configuration whose tags will be replaced.
        in: path
        name: provider_configuration
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/update-resource-tags-request.yml
              empty:
                $ref: examples/replace-resource-tags-empty-request.yml
            schema:
              $ref: '#/components/schemas/TagRelationshipFieldsetsListingDocument'
      responses:
        '204':
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Replace provider configuration's tags
      tags:
      - provider-configurations
      x-resource: ProviderConfiguration
      x-service: tf-api
    post:
      description: |
        This endpoint assigns the list of [tags](/docs/tags-1) to the provider configuration.
      operationId: add_provider_configuration_tags
      parameters:
      - description: |
          The provider configuration to add the tags to.
        in: path
        name: provider_configuration
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/update-resource-tags-request.yml
            schema:
              $ref: '#/components/schemas/TagRelationshipFieldsetsListingDocument'
      responses:
        '204':
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Add tags to the provider configuration
      tags:
      - provider-configurations
      x-resource: ProviderConfiguration
      x-service: tf-api
  /provider-configurations/{provider_configuration}/workspaces-usage:
    get:
      description: |
        Returns a list of workspaces that use the given provider configuration.
      operationId: get_provider_configuration_workspace_usage
      parameters:
      - description: The ID of the Provider configuration.
        in: path
        name: provider_configuration
        required: true
        schema:
          type: string
      - description: Filter provider configuration usage by environment.
        in: query
        name: filter[environment]
        required: false
        schema:
          type: string
      - description: Filter provider configuration usage by workspace name.
        in: query
        name: filter[workspace][name]
        required: false
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - environment-name
            - workspace-name
            type: string
          type: array
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProviderConfigurationWorkspaceUsageFieldsetsListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get provider configuration usage
      tags:
      - provider-configuration-usage
      x-resource: ProviderConfiguration
      x-service: tf-api
  /reports/access-tokens:
    get:
      description: This endpoint returns a list of access token usage on the account.
      operationId: list_access_token_usage
      parameters:
      - description: Format of the response. It can be 'json' or 'csv'.
        in: query
        name: format
        required: false
        schema:
          type: string
      - description: Returns tokens by expiration status
        in: query
        name: filter[is-expired]
        required: false
        schema:
          type: string
      - description: 'Filter tokens by owner identity status (user or service account). Allowed values: Active, Inactive.'
        in: query
        name: filter[user][status]
        required: false
        schema:
          enum:
          - Active
          - Inactive
          type: string
      - description: Filter tokens by creation date.
        in: query
        name: filter[created-at]
        required: false
        schema:
          type: string
      - description: Page number.
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size.
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: Query by token and user email
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - created-at
            - expires-at
            - last-used-at
            - owner-email
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AccessTokenUsageListingDocument'
            text/csv:
              schema:
                format: csv
                type: string
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Access token usage not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get Access Token Usage
      tags:
      - access-token-usage
      x-mcp-tool: true
      x-resource: AccessTokenUsage
      x-service: tf-api
  /reports/ai-usage:
    get:
      description: This endpoint returns a list of AI usage for the account.
      operationId: list_ai_usage
      parameters:
      - description: Page number.
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size.
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: Query by run id.
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - requested-at
            - requested-by-email
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            ai-usages:
              description: The comma-separated list of fields to return in response for AiUsage resource.
              type: string
            runs:
              description: The comma-separated list of fields to return in response for Run resource.
              type: string
          type: object
        style: deepObject
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - run
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AiUsageListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: AI usage not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get AI Usage
      tags:
      - ai-usage
      x-resource: AiUsage
      x-service: tf-api
  /reports/ai-usage/{ai_usage}:
    get:
      description: This endpoint returns instance of AI usage.
      operationId: get_ai_usage
      parameters:
      - description: The ID of the AI usage instance.
        in: path
        name: ai_usage
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - run
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            ai-usages:
              description: The comma-separated list of fields to return in response for AiUsage resource.
              type: string
            runs:
              description: The comma-separated list of fields to return in response for Run resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AiUsageDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: AI usage not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get AI usage
      tags:
      - ai-usage
      x-resource: AiUsage
      x-service: tf-api
  /reports/billing:
    get:
      description: This endpoint returns billing usage statistics.
      operationId: list_billing_usage
      parameters:
      - description: 'The date filter. Example: `filter[date]=between:2022-01-01T00:00:00Z,2022-02-01T00:00:00Z`'
        in: query
        name: filter[date]
        required: true
        schema:
          type: string
      - description: Format of the response. It can be 'json' or 'csv'.
        in: query
        name: format
        required: false
        schema:
          type: string
      - description: Breakdown by account, environment, workspace or both (comma-separated) If the parent control tower account
          breaks down by workspace and environment shows the values from current account.
        in: query
        name: breakdown-by
        required: false
        schema:
          items:
            enum:
            - account
            - environment
            - workspace
            type: string
          type: array
      - description: Search by workspace/environment name or ID.
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: Page number.
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size.
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - account-name
            - environment-name
            - plan-apply-runs
            - plan-only-runs
            - total-runs
            - workspace-name
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/BillingUsageListingDocument'
            text/csv:
              schema:
                format: csv
                type: string
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List billing usages.
      tags:
      - billing-usage
      x-mcp-tool: true
      x-resource: BillingUsage
      x-service: tf-api
  /reports/module-namespaces:
    get:
      description: This endpoint lists unique terraform module usage namespaces.
      operationId: list_module_usage_namespaces
      parameters:
      - description: The search string. Supports search by module source, namespace name or ID.
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: The ID of the module usage namespace.
        in: query
        name: filter[tf-module-namespace]
        required: false
        schema:
          type: string
      - description: Page number.
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size.
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - namespace-name
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            accounts:
              description: The comma-separated list of fields to return in response for Account resource.
              type: string
            environments:
              description: The comma-separated list of fields to return in response for Environment resource.
              type: string
            tf-module-namespaces:
              description: The comma-separated list of fields to return in response for ModuleUsageNamespace resource.
              type: string
          type: object
        style: deepObject
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - account
            - namespace-account
            - namespace-environment
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ModuleUsageNamespaceListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List terraform module usage namespaces
      tags:
      - terraform-module-usage
      x-mcp-tool: true
      x-resource: ModuleUsageNamespace
      x-service: tf-api
  /reports/module-sources:
    get:
      description: This endpoint lists unique terraform module sources.
      operationId: list_terraform_module_sources
      parameters:
      - description: The search string. Supports search by module source.
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: Page number.
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size.
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TerraformModuleUsageSourceFieldsetsListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List terraform module sources
      tags:
      - terraform-module-usage
      x-mcp-tool: true
      x-resource: TerraformModuleUsage
      x-service: tf-api
  /reports/module-usage:
    get:
      description: This endpoint lists terraform module usage.
      operationId: list_terraform_module_usage
      parameters:
      - description: The search string. Supports search by workspace name.
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: Page number.
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size.
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: Filter by terraform module usage.
        in: query
        name: filter[tf-module-usage]
        required: true
        schema:
          type: string
      - description: Filter modules usage by version.
        in: query
        name: filter[version]
        required: false
        schema:
          type: string
      - description: Format of the response. It can be 'json' or 'csv'.
        in: query
        name: format
        required: false
        schema:
          type: string
      - description: The workspace ID to list modules usage for.
        in: query
        name: filter[workspace]
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - created-at
            - environment
            - version
            - workspace
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            environments:
              description: The comma-separated list of fields to return in response for Environment resource.
              type: string
            tf-module-version-usages:
              description: The comma-separated list of fields to return in response for TerraformModuleVersionUsage resource.
              type: string
            workspaces:
              description: The comma-separated list of fields to return in response for Workspace resource.
              type: string
          type: object
        style: deepObject
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - environment
            - workspace
            type: string
          type: array
      - description: The environment ID to list modules usage for.
        in: query
        name: filter[environment]
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/TerraformModuleVersionUsageListingDocument'
            text/csv:
              schema:
                format: csv
                type: string
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List terraform module usage
      tags:
      - terraform-module-versions-usage
      x-mcp-tool: true
      x-resource: TerraformModuleVersionUsage
      x-service: tf-api
  /reports/module-versions-usage:
    get:
      description: This endpoint lists unique terraform module versions.
      operationId: list_terraform_module_versions_usage
      parameters:
      - description: Filter by terraform module usage.
        in: query
        name: filter[tf-module-usage]
        required: true
        schema:
          type: string
      - description: Filter by module version.
        in: query
        name: filter[version]
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TerraformModuleUsageVersionFieldsetsListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List unique terraform module versions
      tags:
      - terraform-module-versions-usage
      x-mcp-tool: true
      x-resource: TerraformModuleVersionUsage
      x-service: tf-api
  /reports/modules:
    get:
      description: This endpoint lists terraform module usages.
      operationId: list_terraform_module_usages
      parameters:
      - description: The search string. Supports search by module name or parent module name.
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: Page number.
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size.
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The namespace ID to list modules for.
        in: query
        name: filter[tf-module-namespace]
        required: false
        schema:
          type: string
      - description: Filter modules by source.
        in: query
        name: filter[source]
        required: false
        schema:
          type: string
      - description: Format of the response. It can be 'json' or 'csv'.
        in: query
        name: format
        required: false
        schema:
          type: string
      - description: The workspace ID to list modules usage for.
        in: query
        name: filter[workspace]
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - module
            - namespace
            - parent-module
            - source
            - versions-used-count
            - workspaces-count
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            accounts:
              description: The comma-separated list of fields to return in response for Account resource.
              type: string
            environments:
              description: The comma-separated list of fields to return in response for Environment resource.
              type: string
            tf-module-namespaces:
              description: The comma-separated list of fields to return in response for ModuleUsageNamespace resource.
              type: string
          type: object
        style: deepObject
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - namespace
            type: string
          type: array
      - description: The environment ID to list modules usage for.
        in: query
        name: filter[environment]
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/TerraformModuleUsageListingDocument'
            text/csv:
              schema:
                format: csv
                type: string
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List terraform module usages
      tags:
      - terraform-module-usage
      x-mcp-tool: true
      x-resource: TerraformModuleUsage
      x-service: tf-api
  /reports/modules/{module_usage}:
    get:
      description: This endpoint returns instance of module usage.
      operationId: get_module_usage
      parameters:
      - description: The ID of the module usage instance.
        in: path
        name: module_usage
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - namespace
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            tf-module-namespaces:
              description: The comma-separated list of fields to return in response for ModuleUsageNamespace resource.
              type: string
            tf-module-usages:
              description: The comma-separated list of fields to return in response for TerraformModuleUsage resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/TerraformModuleUsageDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Module usage not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get module usage
      tags:
      - terraform-module-usage
      x-resource: TerraformModuleUsage
      x-service: tf-api
  /reports/provider-sources:
    get:
      description: This endpoint lists unique terraform provider sources.
      operationId: list_terraform_provider_sources
      parameters:
      - description: Query string
        in: query
        name: query
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TerraformProviderUsageSourceFieldsetsListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List unique terraform provider sources
      tags:
      - terraform-provider-usage
      x-mcp-tool: true
      x-resource: TerraformProviderUsage
      x-service: tf-api
  /reports/provider-usage:
    get:
      description: This endpoint lists terraform provider version usages.
      operationId: list_terraform_provider_usage
      parameters:
      - description: The search string. Supports search by workspace name.
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: Page number.
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size.
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: Filter by terraform provider usage.
        in: query
        name: filter[tf-provider-usage]
        required: true
        schema:
          type: string
      - description: Filter providers usage by version.
        in: query
        name: filter[version]
        required: false
        schema:
          type: string
      - description: Format of the response. It can be 'json' or 'csv'.
        in: query
        name: format
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - created-at
            - environment
            - version
            - workspace
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            environments:
              description: The comma-separated list of fields to return in response for Environment resource.
              type: string
            tf-provider-version-usages:
              description: The comma-separated list of fields to return in response for TerraformProviderVersionUsage resource.
              type: string
            workspaces:
              description: The comma-separated list of fields to return in response for Workspace resource.
              type: string
          type: object
        style: deepObject
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - environment
            - workspace
            type: string
          type: array
      - description: The environment ID to list providers usage for.
        in: query
        name: filter[environment]
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/TerraformProviderVersionUsageListingDocument'
            text/csv:
              schema:
                format: csv
                type: string
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List terraform provider version usages
      tags:
      - terraform-provider-version-usage
      x-mcp-tool: true
      x-resource: TerraformProviderVersionUsage
      x-service: tf-api
  /reports/provider-versions-usage:
    get:
      description: This endpoint lists unique terraform provider versions.
      operationId: list_terraform_provider_versions_usage
      parameters:
      - description: Filter by terraform provider usage.
        in: query
        name: filter[tf-provider-usage]
        required: true
        schema:
          type: string
      - description: Query string
        in: query
        name: query
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TerraformProviderUsageVersionFieldsetsListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List unique terraform provider versions
      tags:
      - terraform-provider-version-usage
      x-mcp-tool: true
      x-resource: TerraformProviderVersionUsage
      x-service: tf-api
  /reports/providers:
    get:
      description: This endpoint lists terraform provider usages.
      operationId: list_terraform_provider_usages
      parameters:
      - description: Page number.
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size.
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: Filter providers by source.
        in: query
        name: filter[source]
        required: false
        schema:
          type: string
      - description: Format of the response. It can be 'json' or 'csv'.
        in: query
        name: format
        required: false
        schema:
          type: string
      - description: Query string
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - provider
            - source
            - versions-used-count
            - workspaces-count
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            tf-provider-usages:
              description: The comma-separated list of fields to return in response for TerraformProviderUsage resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/TerraformProviderUsageListingDocument'
            text/csv:
              schema:
                format: csv
                type: string
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List terraform provider usages
      tags:
      - terraform-provider-usage
      x-mcp-tool: true
      x-resource: TerraformProviderUsage
      x-service: tf-api
  /reports/providers/{provider_usage}:
    get:
      description: This endpoint returns instance of provider usage.
      operationId: get_provider_usage
      parameters:
      - description: The ID of the provider usage instance.
        in: path
        name: provider_usage
        required: true
        schema:
          type: string
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            tf-provider-usages:
              description: The comma-separated list of fields to return in response for TerraformProviderUsage resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/TerraformProviderUsageDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Provider usage not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get provider usage
      tags:
      - terraform-provider-usage
      x-resource: TerraformProviderUsage
      x-service: tf-api
  /reports/resource-providers:
    get:
      description: This endpoint lists unique terraform resource provider types.
      operationId: list_terraform_resource_providers
      parameters:
      - description: Query string
        in: query
        name: query
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TerraformResourceUsageProviderTypeFieldsetsListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List unique terraform resource provider types
      tags:
      - terraform-resource-usage
      x-mcp-tool: true
      x-resource: TerraformResourceUsage
      x-service: tf-api
  /reports/resource-usage:
    get:
      description: This endpoint lists terraform resource instances usage.
      operationId: list_terraform_resource_instances_usage
      parameters:
      - description: The search string. Supports search by external id or resource address.
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: Page number.
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size.
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: Filter by terraform resource usage.
        in: query
        name: filter[tf-resource-usage]
        required: true
        schema:
          type: string
      - description: Filter by terraform resource usage status.
        in: query
        name: filter[is-active]
        required: false
        schema:
          type: string
      - description: Filter duplicate resources usage.
        in: query
        name: filter[is-duplicate]
        required: false
        schema:
          type: string
      - description: Format of the response. It can be 'json' or 'csv'.
        in: query
        name: format
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - is-active
            - name
            - updated-at
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            environments:
              description: The comma-separated list of fields to return in response for Environment resource.
              type: string
            runs:
              description: The comma-separated list of fields to return in response for Run resource.
              type: string
            state-versions:
              description: The comma-separated list of fields to return in response for StateVersion resource.
              type: string
            tf-resource-instance-usages:
              description: The comma-separated list of fields to return in response for TerraformResourceInstanceUsage resource.
              type: string
            workspaces:
              description: The comma-separated list of fields to return in response for Workspace resource.
              type: string
          type: object
        style: deepObject
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - environment
            - run
            - state-version
            - workspace
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/TerraformResourceInstanceUsageListingDocument'
            text/csv:
              schema:
                format: csv
                type: string
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List terraform resource instances usage
      tags:
      - terraform-resource-instances-usage
      x-mcp-tool: true
      x-resource: TerraformResourceInstanceUsage
      x-service: tf-api
  /reports/resources:
    get:
      description: This endpoint lists terraform resource usages.
      operationId: list_terraform_resource_usages
      parameters:
      - description: The search string. Supports search by resource name.
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: Page number.
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size.
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: Filter resources by provider type.
        in: query
        name: filter[provider-type]
        required: false
        schema:
          type: string
      - description: Format of the response. It can be 'json' or 'csv'.
        in: query
        name: format
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - name
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            tf-resource-usages:
              description: The comma-separated list of fields to return in response for TerraformResourceUsage resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/TerraformResourceUsageListingDocument'
            text/csv:
              schema:
                format: csv
                type: string
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List terraform resource usages
      tags:
      - terraform-resource-usage
      x-mcp-tool: true
      x-resource: TerraformResourceUsage
      x-service: tf-api
  /reports/resources/{resource_usage}:
    get:
      description: This endpoint returns instance of resource usage.
      operationId: get_resource_usage
      parameters:
      - description: The ID of the resource usage instance.
        in: path
        name: resource_usage
        required: true
        schema:
          type: string
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            tf-resource-usages:
              description: The comma-separated list of fields to return in response for TerraformResourceUsage resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/TerraformResourceUsageDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Resource usage not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get resource usage
      tags:
      - terraform-resource-usage
      x-resource: TerraformResourceUsage
      x-service: tf-api
  /reports/tf-versions-usage:
    get:
      description: This endpoint lists terraform versions usage.
      operationId: list_terraform_versions_usage
      parameters:
      - description: The search string. Supports search by workspace name of terraform version usage.
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: Filter terraform versions usage by version.
        in: query
        name: filter[version]
        required: false
        schema:
          type: string
      - description: Filter terraform versions usage by auto versions.
        in: query
        name: filter[is-auto]
        required: false
        schema:
          type: string
      - description: Filter terraform versions usage by IaC platform.
        in: query
        name: filter[iac-platform]
        required: false
        schema:
          type: string
      - description: Format of the response. It can be 'json' or 'csv'.
        in: query
        name: format
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - created-at
            - environment
            - iac-platform
            - version
            - workspace
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            accounts:
              description: The comma-separated list of fields to return in response for Account resource.
              type: string
            environments:
              description: The comma-separated list of fields to return in response for Environment resource.
              type: string
            tf-version-usages:
              description: The comma-separated list of fields to return in response for TerraformVersionUsage resource.
              type: string
            workspaces:
              description: The comma-separated list of fields to return in response for Workspace resource.
              type: string
          type: object
        style: deepObject
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - account
            - environment
            - workspace
            type: string
          type: array
      - description: The account ID to list terraform versions usage for.
        in: query
        name: filter[account]
        required: true
        schema:
          type: string
      - description: The environment ID to list terraform versions usage for.
        in: query
        name: filter[environment]
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/TerraformVersionUsageListingDocument'
            text/csv:
              schema:
                format: csv
                type: string
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List terraform versions usage
      tags:
      - terraform-version-usage
      x-resource: TerraformVersionUsage
      x-service: tf-api
  /reports/tf-versions-usage-versions:
    get:
      description: This endpoint lists unique terraform versions in use.
      operationId: list_terraform_versions_usage_versions
      parameters:
      - description: Query string.
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TerraformVersionUsageVersionFieldsetsListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List unique terraform versions in use
      tags:
      - terraform-version-usage
      x-mcp-tool: true
      x-resource: TerraformVersionUsage
      x-service: tf-api
  /roles:
    get:
      description: |
        This endpoint returns a list of [IAM](https://docs.scalr.io/docs/identity-and-access-management) roles.
      operationId: get_roles
      parameters:
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The account filter.
        in: query
        name: filter[account]
        required: false
        schema:
          type: string
      - description: The role filter.
        in: query
        name: filter[role]
        required: false
        schema:
          type: string
      - description: The role name filter.
        in: query
        name: filter[name]
        required: false
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - account
            - permissions
            type: string
          type: array
      - description: Query string
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - name
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/RoleListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Roles
      tags:
      - roles
      x-mcp-tool: true
      x-resource: Role
      x-service: tf-api
    post:
      description: Create a new [IAM](https://docs.scalr.io/docs/identity-and-access-management) role.
      operationId: create_role
      parameters:
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - account
            - permissions
            type: string
          type: array
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/create-role-request.yml
            schema:
              $ref: '#/components/schemas/RoleDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/create-role-response.yml
              schema:
                $ref: '#/components/schemas/RoleDocument'
          description: Successfully created.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Account not found or user unauthorized.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create a Role
      tags:
      - roles
      x-resource: Role
      x-service: tf-api
  /roles/{role}:
    delete:
      description: The endpoint deletes [IAM](https://docs.scalr.io/docs/identity-and-access-management) role by ID.
      operationId: delete_role
      parameters:
      - in: path
        name: role
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Successfully deleted.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Role not found.
        '409':
          description: Conflict; check the error object for more information.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete a Role
      tags:
      - roles
      x-resource: Role
      x-service: tf-api
    get:
      description: The endpoint returns an [IAM](https://docs.scalr.io/docs/identity-and-access-management) role by ID.
      operationId: get_role
      parameters:
      - description: The ID of the role.
        in: path
        name: role
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - account
            - permissions
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/RoleDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Role not found.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get a Role
      tags:
      - roles
      x-mcp-tool: true
      x-resource: Role
      x-service: tf-api
    patch:
      description: This endpoint updates [IAM](https://docs.scalr.io/docs/identity-and-access-management) role by ID.
      operationId: update_role
      parameters:
      - description: The ID of the role to update.
        in: path
        name: role
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - account
            - permissions
            type: string
          type: array
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/RoleDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/RoleDocument'
          description: Successfully updated.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Role not found.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update a Role
      tags:
      - roles
      x-resource: Role
      x-service: tf-api
  /run-schedule-rules:
    get:
      description: |
        This endpoint returns a list of run schedule rules.
      operationId: list_schedule_rules
      parameters:
      - description: Filter by the ID of the workspace.
        in: query
        name: filter[workspace]
        required: true
        schema:
          type: string
      - description: Filter by the schedule mode.
        in: query
        name: filter[schedule-mode]
        required: false
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - workspace
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/RunScheduleRuleListingDocument'
          description: Request was successful.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List all run schedule rules.
      tags:
      - run-schedule-rules
      x-resource: RunScheduleRule
      x-service: tf-api
    post:
      description: |-
        Create a new run schedule rule.

        In order to create a run schedule rule, the user must have `workspaces:set-schedule`
        permission.
      operationId: create_run_schedule_rule
      parameters: []
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/RunScheduleRuleDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/RunScheduleRuleDocument'
          description: Successfully created.
        '403':
          description: Missing required permissions.
        '404':
          description: Relationship not found, or user unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.)
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create a Run schedule rule.
      tags:
      - run-schedule-rules
      x-resource: RunScheduleRule
      x-service: tf-api
  /run-schedule-rules/{run_schedule_rule}:
    delete:
      operationId: delete_run_schedule_rule
      parameters:
      - description: The ID of the run schedule rule to delete.
        in: path
        name: run_schedule_rule
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Run schedule rule deleted.
        '404':
          description: Run schedule rule not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete a Schedule Rule.
      tags:
      - run-schedule-rules
      x-resource: RunScheduleRule
      x-service: tf-api
    get:
      description: |
        Show details of a specific run schedule rule.
      operationId: get_run_schedule_rule
      parameters:
      - description: The ID of the run schedule rule to show.
        in: path
        name: run_schedule_rule
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - workspace
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/RunScheduleRuleDocument'
          description: Request was successful.
        '404':
          description: Run schedule rule not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get a Run schedule rule.
      tags:
      - run-schedule-rules
      x-resource: RunScheduleRule
      x-service: tf-api
    patch:
      description: |
        Updates a specific run schedule rule based on the provided rule ID, schedule mode, and schedule.
        It validates the cron expression and raises an error if it's invalid.
      operationId: update_run_schedule_rule
      parameters:
      - description: The ID of the run schedule rule to show.
        in: path
        name: run_schedule_rule
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/RunScheduleRuleDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/RunScheduleRuleDocument'
          description: Request was successful.
        '404':
          description: Run schedule rule not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update a Run schedule rule.
      tags:
      - run-schedule-rules
      x-resource: RunScheduleRule
      x-service: tf-api
  /run-triggers:
    post:
      description: |-
        Create a new run trigger.

        In order to create a run trigger, the user must have `workspaces:read`
        permission for the upstream workspace and permissions `workspaces:update`
        and `runs:create` for the downstream workspace.
      operationId: create_run_trigger
      parameters: []
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/RunTriggerDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/RunTriggerDocument'
          description: Successfully created a run trigger.
        '403':
          description: Missing required permissions.
        '404':
          description: Relationship not found, or user unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.)
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create a Run Trigger.
      tags:
      - run-triggers
      x-resource: RunTrigger
      x-service: tf-api
  /run-triggers/{run_trigger}:
    delete:
      operationId: delete_run_trigger
      parameters:
      - description: The ID of the run trigger to delete.
        in: path
        name: run_trigger
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Run trigger deleted.
        '404':
          description: Run trigger not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete a Run Trigger
      tags:
      - run-triggers
      x-resource: RunTrigger
      x-service: tf-api
    get:
      description: |
        Show details of a specific trigger.
      operationId: get_run_trigger
      parameters:
      - description: The ID of the run trigger to show.
        in: path
        name: run_trigger
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - downstream
            - upstream
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/RunTriggerDocument'
          description: Request was successful.
        '404':
          description: Run trigger not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get a Run Trigger
      tags:
      - run-triggers
      x-resource: RunTrigger
      x-service: tf-api
  /runs:
    get:
      description: This endpoint lists runs for a specific workspace.
      operationId: get_runs
      parameters:
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - apply
            - configuration-version
            - cost-estimate
            - created-by
            - created-by-run
            - environment
            - plan
            - policy-checks
            - status-transitions
            - tags
            - vcs-revision
            - workspace
            type: string
          type: array
      - description: The workspace ID to list runs for.
        in: query
        name: filter[workspace]
        required: false
        schema:
          type: string
      - description: The account ID to list runs for.
        in: query
        name: filter[account]
        required: false
        schema:
          type: string
      - description: The environment ID to list runs for.
        in: query
        name: filter[environment]
        required: false
        schema:
          type: string
      - description: The comma-separated list of run IDs.
        in: query
        name: filter[run]
        required: false
        schema:
          type: string
      - description: The run status filter.
        in: query
        name: filter[status]
        required: false
        schema:
          type: string
      - description: The run source filter.
        in: query
        name: filter[source]
        required: false
        schema:
          type: string
      - description: Commit sha that affected runs
        in: query
        name: filter[vcs-revision]
        required: false
        schema:
          type: string
      - description: The ID of the User who triggered this run
        in: query
        name: filter[created-by]
        required: false
        schema:
          type: string
      - description: The ID of the Run which triggered this run
        in: query
        name: filter[created-by-run]
        required: false
        schema:
          type: string
      - description: The list of environment or workspaces IDs to match
        in: query
        name: filter[env-or-ws]
        required: false
        schema:
          type: string
      - description: The run created at filter.
        in: query
        name: filter[created-at]
        required: false
        schema:
          type: string
      - description: Query string
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: The is dry runs filter.
        in: query
        name: filter[is-dry]
        required: false
        schema:
          type: string
      - description: List only runs that are scheduled.
        in: query
        name: scheduled
        required: false
        schema:
          type: string
      - description: Filter runs by tags.
        in: query
        name: filter[tag]
        required: false
        schema:
          type: string
      - description: Filter the runs by drifted resources count.
        in: query
        name: filter[resource-drifts]
        required: false
        schema:
          type: string
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            applies:
              description: The comma-separated list of fields to return in response for Apply resource.
              type: string
            configuration-versions:
              description: The comma-separated list of fields to return in response for ConfigurationVersion resource.
              type: string
            cost-estimates:
              description: The comma-separated list of fields to return in response for CostEstimate resource.
              type: string
            environments:
              description: The comma-separated list of fields to return in response for Environment resource.
              type: string
            plans:
              description: The comma-separated list of fields to return in response for Plan resource.
              type: string
            policy-checks:
              description: The comma-separated list of fields to return in response for PolicyCheck resource.
              type: string
            runs:
              description: The comma-separated list of fields to return in response for Run resource.
              type: string
            status-transitions:
              description: The comma-separated list of fields to return in response for StatusTransition resource.
              type: string
            tags:
              description: The comma-separated list of fields to return in response for Tag resource.
              type: string
            users:
              description: The comma-separated list of fields to return in response for User resource.
              type: string
            vcs-revisions:
              description: The comma-separated list of fields to return in response for VcsRevision resource.
              type: string
            workspaces:
              description: The comma-separated list of fields to return in response for Workspace resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/get-runs.yml
              schema:
                $ref: '#/components/schemas/RunListingDocument'
          description: Success.
        '404':
          description: Workspace not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Runs
      tags:
      - runs
      x-mcp-tool: true
      x-resource: Run
      x-service: tf-api
    post:
      description: |
        A run performs terraform plan and apply using a configuration version and
        the workspace's current variables. If the configuration version is omitted, the run will
        be created using the workspace's latest configuration version. If you want to create a
        dry run, specify `is-dry: true` or reference configuration version with `is-dry: true`
        in the relationships.
      operationId: create_run
      parameters:
      - description: The ID of VCS user who triggered the run. It is for the internal use only.
        in: query
        name: vcs-user-id
        required: false
        schema:
          type: integer
      - description: The ID of a VCS task which triggered the run. Internal use only.
        in: query
        name: vcs-task-id
        required: false
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/create-run-request.yml
            schema:
              $ref: '#/components/schemas/RunDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/create-run-response.yml
              schema:
                $ref: '#/components/schemas/RunDocument'
          description: Successfully created a run.
        '404':
          description: Environment or workspace not found, or user unauthorized to perform action.
        '422':
          description: Invalid attributes.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create a Run
      tags:
      - runs
      x-resource: Run
      x-service: tf-api
  /runs-queue:
    get:
      description: |
        This endpoint lists Runs Queue on allowed scopes.
      operationId: get_runs_queue
      parameters:
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - apply
            - configuration-version
            - cost-estimate
            - created-by
            - created-by-run
            - environment
            - plan
            - policy-checks
            - status-transitions
            - tags
            - vcs-revision
            - workspace
            type: string
          type: array
      - description: The workspace ID to list runs for.
        in: query
        name: filter[workspace]
        required: false
        schema:
          type: string
      - description: The account ID to list runs for.
        in: query
        name: filter[account]
        required: false
        schema:
          type: string
      - description: The environment ID to list runs for.
        in: query
        name: filter[environment]
        required: false
        schema:
          type: string
      - description: The comma-separated list of run IDs.
        in: query
        name: filter[run]
        required: false
        schema:
          type: string
      - description: The run status filter.
        in: query
        name: filter[status]
        required: false
        schema:
          type: string
      - description: The run source filter.
        in: query
        name: filter[source]
        required: false
        schema:
          type: string
      - description: Commit sha that affected runs
        in: query
        name: filter[vcs-revision]
        required: false
        schema:
          type: string
      - description: The ID of the User who triggered this run
        in: query
        name: filter[created-by]
        required: false
        schema:
          type: string
      - description: The ID of the Run which triggered this run
        in: query
        name: filter[created-by-run]
        required: false
        schema:
          type: string
      - description: The list of environment or workspaces IDs to match
        in: query
        name: filter[env-or-ws]
        required: false
        schema:
          type: string
      - description: The run created at filter.
        in: query
        name: filter[created-at]
        required: false
        schema:
          type: string
      - description: Query string
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: The is dry runs filter.
        in: query
        name: filter[is-dry]
        required: false
        schema:
          type: string
      - description: List only runs that are scheduled.
        in: query
        name: scheduled
        required: false
        schema:
          type: string
      - description: Filter runs by tags.
        in: query
        name: filter[tag]
        required: false
        schema:
          type: string
      - description: Filter the runs by drifted resources count.
        in: query
        name: filter[resource-drifts]
        required: false
        schema:
          type: string
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            applies:
              description: The comma-separated list of fields to return in response for Apply resource.
              type: string
            configuration-versions:
              description: The comma-separated list of fields to return in response for ConfigurationVersion resource.
              type: string
            cost-estimates:
              description: The comma-separated list of fields to return in response for CostEstimate resource.
              type: string
            environments:
              description: The comma-separated list of fields to return in response for Environment resource.
              type: string
            plans:
              description: The comma-separated list of fields to return in response for Plan resource.
              type: string
            policy-checks:
              description: The comma-separated list of fields to return in response for PolicyCheck resource.
              type: string
            runs:
              description: The comma-separated list of fields to return in response for Run resource.
              type: string
            status-transitions:
              description: The comma-separated list of fields to return in response for StatusTransition resource.
              type: string
            tags:
              description: The comma-separated list of fields to return in response for Tag resource.
              type: string
            users:
              description: The comma-separated list of fields to return in response for User resource.
              type: string
            vcs-revisions:
              description: The comma-separated list of fields to return in response for VcsRevision resource.
              type: string
            workspaces:
              description: The comma-separated list of fields to return in response for Workspace resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/get-runs.yml
              schema:
                $ref: '#/components/schemas/RunListingDocument'
          description: Success.
        '404':
          description: User unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Runs Queue
      tags:
      - runs
      x-resource: Run
      x-service: tf-api
  /runs/{run}:
    get:
      description: Show details of a specific run.
      operationId: get_run
      parameters:
      - description: The ID of the run to show.
        example: run-t61gbtqgg8553h8
        in: path
        name: run
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - apply
            - configuration-version
            - cost-estimate
            - created-by
            - created-by-run
            - environment
            - plan
            - policy-checks
            - status-transitions
            - tags
            - vcs-revision
            - workspace
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            applies:
              description: The comma-separated list of fields to return in response for Apply resource.
              type: string
            configuration-versions:
              description: The comma-separated list of fields to return in response for ConfigurationVersion resource.
              type: string
            cost-estimates:
              description: The comma-separated list of fields to return in response for CostEstimate resource.
              type: string
            environments:
              description: The comma-separated list of fields to return in response for Environment resource.
              type: string
            plans:
              description: The comma-separated list of fields to return in response for Plan resource.
              type: string
            policy-checks:
              description: The comma-separated list of fields to return in response for PolicyCheck resource.
              type: string
            runs:
              description: The comma-separated list of fields to return in response for Run resource.
              type: string
            status-transitions:
              description: The comma-separated list of fields to return in response for StatusTransition resource.
              type: string
            tags:
              description: The comma-separated list of fields to return in response for Tag resource.
              type: string
            users:
              description: The comma-separated list of fields to return in response for User resource.
              type: string
            vcs-revisions:
              description: The comma-separated list of fields to return in response for VcsRevision resource.
              type: string
            workspaces:
              description: The comma-separated list of fields to return in response for Workspace resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/get-run.yml
              schema:
                $ref: '#/components/schemas/RunDocument'
          description: Success.
        '404':
          description: Run not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get a Run
      tags:
      - runs
      x-mcp-tool: true
      x-resource: Run
      x-service: tf-api
  /runs/{run}/actions/apply:
    post:
      description: |-
        Apply a run that is paused waiting for confirmation after a plan.

        This includes runs in the `planned` and `policy_checked` states.
        This action is only required for runs that can't be auto-applied.
      operationId: confirm_run
      parameters:
      - description: The ID of the run to confirm.
        in: path
        name: run
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            examples:
              default:
                $ref: examples/apply-run-request.yml
            schema:
              $ref: '#/components/schemas/ConfirmRequest'
      responses:
        '202':
          description: Successfully queued an apply request.
        '404':
          description: Run not found, or user unauthorized to perform action.
        '409':
          description: Run was not paused for confirmation. Apply not allowed.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Apply a Run
      tags:
      - runs
      x-resource: Run
      x-service: tf-api
  /runs/{run}/actions/cancel:
    post:
      description: |-
        Interrupt a run that is currently planning or applying.

        Performing a cancel is roughly equivalent to hitting `ctrl+c` during a Terraform plan or
        apply on the CLI. The running Terraform process is sent an `INT` signal, which instructs
        Terraform to end its work and wrap up in the safest way possible.
      operationId: cancel_run
      parameters:
      - description: The ID of the run to cancel.
        in: path
        name: run
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Comment'
      responses:
        '202':
          description: Successfully queued a cancel request.
        '204':
          description: Run is already cancelled, nothing should be done.
        '404':
          description: Run not found, or user unauthorized to perform action.
        '409':
          description: Run was not planning or applying. Cancel not allowed.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Cancel a Run
      tags:
      - runs
      x-resource: Run
      x-service: tf-api
  /runs/{run}/actions/discard:
    post:
      description: |-
        Skip any remaining work on runs that are paused waiting for confirmation or priority.

        This includes runs in the `pending`, `planned`, `policy_checked` and `policy_override` states.
      operationId: discard_run
      parameters:
      - description: The ID of run to discard.
        in: path
        name: run
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Comment'
      responses:
        '202':
          description: Successfully queued a discard request.
        '404':
          description: Run not found, or user unauthorized to perform action.
        '409':
          description: Run was not paused for confirmation or priority. Discard not allowed.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Discard a Run
      tags:
      - runs
      x-resource: Run
      x-service: tf-api
  /runs/{run}/actions/force:
    post:
      description: |
        Cancel all previous runs in pending or waiting for confirmation statuses.
        If the workspace is locked by a finished run, the lock will be automatically
        removed to allow the forced run to proceed.
      operationId: force_run
      parameters:
      - description: The ID of the run to force.
        in: path
        name: run
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Comment'
      responses:
        '202':
          description: Successfully forced a run.
        '404':
          description: Run not found, or user unauthorized to perform action.
        '409':
          description: Workspace force_latest_run enabled or status is not pending. Force not allowed.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Force Run
      tags:
      - runs
      x-resource: Run
      x-service: tf-api
  /runs/{run}/policy-checks:
    get:
      description: List policy checks for a specific run.
      operationId: list_policy_checks
      parameters:
      - description: The ID of the run.
        example: run-t61g5rlk9qbudh0
        in: path
        name: run
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/get-policy-checks.yml
              schema:
                $ref: '#/components/schemas/PolicyCheckListingDocument'
          description: Success.
        '403':
          description: Plan not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Policy Checks
      tags:
      - policy-checks
      x-resource: PolicyCheck
      x-service: tf-api
  /runs/{run}/policy-input:
    get:
      description: |-
        Get a Zip archive with policy check input data generated for a given run.

        See [Policy Input](https://docs.scalr.io/docs/policy-as-code) data structure.
      operationId: download_policy_input
      parameters:
      - description: The ID of the run.
        in: path
        name: run
        required: true
        schema:
          type: string
      - description: The run stage
        in: query
        name: stage
        required: false
        schema:
          enum:
          - pre_plan
          - post_plan
          type: string
      responses:
        '200':
          description: Successfully generated input archive.
        '404':
          description: Run was not found, plan wasn't completed or user unauthorized to perform the action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Download a Policy Input
      tags:
      - runs
      x-resource: Run
      x-service: tf-api
  /security-rules:
    get:
      description: |-
        This endpoint returns the security rules for the current account.
        If no security rules exist for the account, they will be automatically created with default values.
      operationId: get_security_rules
      parameters: []
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/SecurityRulesDocument'
          description: Success.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get Security Rules
      tags:
      - security_rules
      x-mcp-tool: true
      x-resource: SecurityRules
      x-service: tf-api
    patch:
      description: |-
        This endpoint updates the security rules for the current account.
        If no security rules exist for the account, they will be automatically created.
      operationId: update_security_rules
      parameters: []
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/SecurityRulesDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/SecurityRulesDocument'
          description: Success.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update Security Rules
      tags:
      - security_rules
      x-resource: SecurityRules
      x-service: tf-api
  /service-accounts:
    get:
      description: |
        This endpoint returns a list of [IAM](https://docs.scalr.io/docs/identity-and-access-management) service accounts.
      operationId: get_service_accounts
      parameters:
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The account filter.
        in: query
        name: filter[account]
        required: false
        schema:
          type: string
      - description: The service account filter.
        in: query
        name: filter[service-account]
        required: false
        schema:
          type: string
      - description: The service account email filter.
        in: query
        name: filter[email]
        required: false
        schema:
          type: string
      - description: The service account owner filter.
        in: query
        name: filter[owner]
        required: false
        schema:
          type: string
      - description: Show service accounts owned by me.
        in: query
        name: filter[owned-by-me]
        required: false
        schema:
          type: string
      - description: Filter service accounts with/without owners.
        in: query
        name: filter[has-owners]
        required: false
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - account
            - created-by
            type: string
          type: array
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - description
            - email
            - name
            - status
            type: string
          type: array
      - description: Query string
        in: query
        name: query
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/list-service-accounts.yml
              schema:
                $ref: '#/components/schemas/ServiceAccountListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Service Accounts
      tags:
      - service-accounts
      x-mcp-tool: true
      x-resource: ServiceAccount
      x-service: tf-api
    post:
      description: |
        Create a new [IAM](https://docs.scalr.io/docs/identity-and-access-management) service account.
      operationId: create_service_account
      parameters:
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - account
            - created-by
            type: string
          type: array
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/create-service-account-request.yml
            schema:
              $ref: '#/components/schemas/ServiceAccountDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/create-service-account-response.yml
              schema:
                $ref: '#/components/schemas/ServiceAccountDocument'
          description: Successfully created.
        '403':
          description: User unauthorized to perform this action or service accounts functionality is not enabled for this
            account.
        '404':
          description: Relationship not found or user unauthorized.
        '409':
          description: User quota exceeded.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create a Service Account
      tags:
      - service-accounts
      x-resource: ServiceAccount
      x-service: tf-api
  /service-accounts/assume:
    post:
      description: This endpoint creates service account's access token.
      operationId: assume_service_account
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssumeServiceAccountRequest'
      responses:
        '200':
          content:
            application/json:
              examples:
                default:
                  $ref: examples/create-service-account-token-response.yml
              schema:
                $ref: '#/components/schemas/ServiceAccountTemporaryToken'
          description: Successfully exchanged.
        '401':
          description: Service account not found, or identity unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Exchange OIDC ID token for ephemeral service account access token
      tags:
      - access-tokens-public
      x-resource: AccessToken
      x-service: tf-api
  /service-accounts/{service_account}:
    delete:
      description: The endpoint deletes [IAM](https://docs.scalr.io/docs/identity-and-access-management) service account by
        ID.
      operationId: delete_service_account
      parameters:
      - description: The ID of the service account to delete.
        in: path
        name: service_account
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Successfully deleted.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Service account not found.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete a Service Account
      tags:
      - service-accounts
      x-resource: ServiceAccount
      x-service: tf-api
    get:
      description: This endpoint returns an [IAM](https://docs.scalr.io/docs/identity-and-access-management) service account
        by ID.
      operationId: get_service_account
      parameters:
      - description: |
          The ID of the service account.
        in: path
        name: service_account
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - account
            - created-by
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/get-service-account.yml
              schema:
                $ref: '#/components/schemas/ServiceAccountDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Service account not found.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get a Service Account
      tags:
      - service-accounts
      x-mcp-tool: true
      x-resource: ServiceAccount
      x-service: tf-api
    patch:
      description: |
        This endpoint updates [IAM](https://docs.scalr.io/docs/identity-and-access-management) service account by ID.
      operationId: update_service_account
      parameters:
      - description: |
          The ID of the service account to update.
        in: path
        name: service_account
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - account
            - created-by
            type: string
          type: array
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/update-service-account-request.yml
            schema:
              $ref: '#/components/schemas/ServiceAccountDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/update-service-account-response.yml
              schema:
                $ref: '#/components/schemas/ServiceAccountDocument'
          description: Successfully updated.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Service account not found.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update a Service Account
      tags:
      - service-accounts
      x-resource: ServiceAccount
      x-service: tf-api
  /service-accounts/{service_account}/access-tokens:
    get:
      description: This endpoint lists service account's access tokens.
      operationId: list_service_account_access_tokens
      parameters:
      - description: The ID of the service account to list tokens for.
        in: path
        name: service_account
        required: true
        schema:
          type: string
      - description: Returns tokens by expiration status
        in: query
        name: filter[is-expired]
        required: false
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - created-at
            - description
            - expires-at
            - last-used-at
            - name
            type: string
          type: array
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - created-by
            type: string
          type: array
      - description: Query string
        in: query
        name: query
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AccessTokenListingDocument'
          description: Success.
        '404':
          description: Service account not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List access tokens of a service account
      tags:
      - access-tokens
      x-resource: AccessToken
      x-service: tf-api
    post:
      description: This endpoint creates service account's access token.
      operationId: create_service_account_token
      parameters:
      - description: The ID of the service account to create a token for.
        in: path
        name: service_account
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - created-by
            type: string
          type: array
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/create-service-account-token-request.yml
            schema:
              $ref: '#/components/schemas/AccessTokenDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/create-service-account-token-response.yml
              schema:
                $ref: '#/components/schemas/AccessTokenDocument'
          description: Successfully created.
        '404':
          description: Service account not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create access token for service account
      tags:
      - access-tokens
      x-resource: AccessToken
      x-service: tf-api
  /service-accounts/{service_account}/assume-policies:
    post:
      description: |
        Create an assume service account policy.
      operationId: create_assume_service_account_policy
      parameters:
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - provider
            - service-account
            type: string
          type: array
      - in: path
        name: service_account
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/AssumeServiceAccountPolicyDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AssumeServiceAccountPolicyDocument'
          description: ''
        '403':
          description: User unauthorized to perform this action or service accounts functionality is not enabled for this
            account.
        '404':
          description: Relationship not found or user unauthorized.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create an assume service account policy
      tags:
      - service-accounts
      x-resource: ServiceAccount
      x-service: tf-api
  /service-accounts/{service_account}/assume-policies/{assume_service_account_policy}:
    delete:
      description: The endpoint deletes an assume service account policy by ID.
      operationId: delete_assume_service_account_policy
      parameters:
      - in: path
        name: service_account
        required: true
        schema:
          type: string
      - in: path
        name: assume_service_account_policy
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Deleted.
        '404':
          description: Assume service account policy not found or user unauthorized.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete an assume service account policy
      tags:
      - service-accounts
      x-resource: ServiceAccount
      x-service: tf-api
    get:
      description: |
        Get an assume service account policy.
      operationId: get_assume_service_account_policy
      parameters:
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - provider
            - service-account
            type: string
          type: array
      - in: path
        name: service_account
        required: true
        schema:
          type: string
      - in: path
        name: assume_service_account_policy
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AssumeServiceAccountPolicyDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get an assume service account policy
      tags:
      - service-accounts
      x-resource: ServiceAccount
      x-service: tf-api
    patch:
      description: |
        Update an assume service account policy.
      operationId: update_assume_service_account_policy
      parameters:
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - provider
            - service-account
            type: string
          type: array
      - in: path
        name: service_account
        required: true
        schema:
          type: string
      - in: path
        name: assume_service_account_policy
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/AssumeServiceAccountPolicyDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/AssumeServiceAccountPolicyDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action or service accounts functionality is not enabled for this
            account.
        '404':
          description: Relationship not found or user unauthorized.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update an assume service account policy
      tags:
      - service-accounts
      x-resource: ServiceAccount
      x-service: tf-api
  /software-versions:
    get:
      description: |
        This endpoint returns a list of software versions.
      operationId: list_software_versions
      parameters:
      - description: The search string. Supports search by version or image of software version.
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: Filter software versions by id.
        in: query
        name: filter[software-version]
        required: false
        schema:
          type: string
      - description: Filter software versions by status.
        in: query
        name: filter[status]
        required: false
        schema:
          type: string
      - description: Filter software versions by semversion.
        in: query
        name: filter[version]
        required: false
        schema:
          type: string
      - description: Filter software versions by deprecation flag.
        in: query
        name: filter[deprecated]
        required: false
        schema:
          type: string
      - description: Filter software versions by latest.
        in: query
        name: filter[latest]
        required: false
        schema:
          type: string
      - description: Filter software versions by software type.
        in: query
        name: filter[software-type]
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - status
            - version
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            software-versions:
              description: The comma-separated list of fields to return in response for SoftwareVersion resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/SoftwareVersionListingDocument'
          description: Success.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List software versions
      tags:
      - software-versions
      x-resource: SoftwareVersion
      x-service: tf-api
  /software-versions/{software_version}:
    get:
      description: Show details of a specific software version.
      operationId: get_software_version
      parameters:
      - description: The software version ID to show.
        in: path
        name: software_version
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/SoftwareVersionDocument'
          description: Success.
        '404':
          description: SoftwareVersion not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get a Software Version
      tags:
      - software-versions
      x-resource: SoftwareVersion
      x-service: tf-api
  /ssh-keys:
    get:
      description: |
        This endpoint returns a list of SSH keys by various filters.
      operationId: list_ssh_keys
      parameters:
      - description: The SSH key name filter.
        in: query
        name: filter[name]
        required: false
        schema:
          type: string
      - description: The SSH key creation date filter.
        in: query
        name: filter[created-at]
        required: false
        schema:
          type: string
      - description: The SSH key account filter.
        in: query
        name: filter[account]
        required: false
        schema:
          type: string
      - description: The ID(s) of the SSH key(s).
        in: query
        name: filter[account-ssh-key]
        required: false
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The search string. Supports search by name of the SSH key.
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - created-at
            - name
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            account-ssh-keys:
              description: The comma-separated list of fields to return in response for SSHKey resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/SSHKeyListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List SSH keys
      tags:
      - ssh_keys
      x-resource: SSHKey
      x-service: tf-api
    post:
      description: |
        Create a new SSH key.
      operationId: create_ssh_key
      parameters: []
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/SSHKeyDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/SSHKeyDocument'
          description: Created.
        '403':
          description: User unauthorized to perform action.
        '404':
          description: Relationship resource not found, or user unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create a SSH Key
      tags:
      - ssh_keys
      x-resource: SSHKey
      x-service: tf-api
  /ssh-keys/{account_ssh_key}:
    delete:
      description: The endpoint deletes an SSH key by ID.
      operationId: delete_ssh_key
      parameters:
      - description: The ID of the SSH key.
        in: path
        name: account_ssh_key
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Deleted.
        '404':
          description: SSH key not found or user unauthorized.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete an SSH Key
      tags:
      - ssh_keys
      x-resource: SSHKey
      x-service: tf-api
    get:
      description: Show details of a specific SSH key.
      operationId: get_ssh_key
      parameters:
      - description: The ID of the SSH key.
        in: path
        name: account_ssh_key
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/SSHKeyDocument'
          description: Success.
        '404':
          description: SSH key not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get a SSH Key
      tags:
      - ssh_keys
      x-resource: SSHKey
      x-service: tf-api
    patch:
      description: |
        This endpoint allows updates to attributes of an existing SSH key.
      operationId: update_ssh_key
      parameters:
      - description: |
          The ID of the account SSH key to update.
        in: path
        name: account_ssh_key
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/SSHKeyDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/SSHKeyDocument'
          description: Updated.
        '403':
          description: User unauthorized to perform action.
        '404':
          description: SSH key not found or user unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update an SSH Key
      tags:
      - ssh_keys
      x-resource: SSHKey
      x-service: tf-api
  /state-versions:
    get:
      operationId: list_state_versions
      parameters:
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - in: query
        name: filter[workspace]
        required: true
        schema:
          type: string
      - in: query
        name: filter[run]
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - created-at
            type: string
          type: array
      - description: Query string
        in: query
        name: query
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/StateVersionListingDocument'
          description: Success
        '404':
          description: Workspace not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Workspace's State Versions
      tags:
      - state-versions
      x-resource: StateVersion
      x-service: tf-api
    post:
      description: Create a state version and set it as the current state version for the given workspace.
      operationId: create_state_version
      parameters: []
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/StateVersionDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/StateVersionDocument'
          description: Successfully created a state version
        '404':
          description: |-
            Workspace not found, workspace does not have a current state version,
            or user unauthorized to perform action.
        '409':
          description: Conflict; check the error object for more information.
        '412':
          description: Precondition failed; check the error object for more information.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create a State Version
      tags:
      - state-versions
      x-resource: StateVersion
      x-service: tf-api
  /state-versions/{state_version}:
    get:
      description: Show details of a specific state version.
      operationId: get_state_version
      parameters:
      - description: The ID of the state version.
        in: path
        name: state_version
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/StateVersionDocument'
          description: Success.
        '404':
          description: State version not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get a State Version
      tags:
      - state-versions
      x-resource: StateVersion
      x-service: tf-api
  /state-versions/{state_version}/download:
    get:
      description: Download the `terraform.tfstate`
      operationId: get_state_version_download
      parameters:
      - description: The ID of the state version.
        in: path
        name: state_version
        required: true
        schema:
          type: string
      responses:
        '200':
          description: ''
        '302':
          description: The location of the temporary download link.
        '404':
          description: State version not found or user unauthorized to perform action.
        '422':
          description: The state version is not uploaded yet.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Download State Version
      tags:
      - state-versions
      x-resource: StateVersion
      x-service: tf-api
  /storage-profiles:
    get:
      description: List all storage profiles.
      operationId: list_storage_profiles
      parameters:
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The resource storage profile name.
        in: query
        name: filter[name]
        required: false
        schema:
          type: string
      - description: The ID of the resource storage profile.
        in: query
        name: filter[storage-profile]
        required: false
        schema:
          type: string
      - description: Whether the storage profile is set as default.
        in: query
        name: filter[default]
        required: false
        schema:
          type: string
      - description: Query string
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - name
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/StorageProfileListingDocument'
          description: Success.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Storage Profiles
      tags:
      - storage_profile
      x-resource: StorageProfile
      x-service: tf-api
    post:
      description: |+
        Create a new storage profile for storing blobs (source code, terraform state, logs, etc).

      operationId: create_storage_profile
      parameters: []
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/StorageProfileDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/StorageProfileDocument'
          description: Success.
        '422':
          description: Invalid arguments.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create Storage Profile
      tags:
      - storage_profile
      x-resource: StorageProfile
      x-service: tf-api
  /storage-profiles/{storage_profile}:
    delete:
      description: Delete a storage profile. The operation is only allowed if the storage profile is not being used by any
        blobs and is not set as default.
      operationId: delete_storage_profile
      parameters:
      - description: The ID of the storage profile to delete.
        in: path
        name: storage_profile
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Success.
        '409':
          description: Cannot delete storage profile that is in use or is set as default.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete Storage Profile
      tags:
      - storage_profile
      x-resource: StorageProfile
      x-service: tf-api
    get:
      description: Get storage profile by id.
      operationId: get_storage_profile
      parameters:
      - in: path
        name: storage_profile
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/StorageProfileDocument'
          description: Success.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get Storage Profile
      tags:
      - storage_profile
      x-resource: StorageProfile
      x-service: tf-api
    patch:
      description: Update an existing storage profile. The operation is only allowed if the storage profile is not being used
        by any blobs.
      operationId: update_storage_profile
      parameters:
      - description: |
          The ID of the storage profile to update.
        in: path
        name: storage_profile
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/StorageProfileDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/StorageProfileDocument'
          description: Success.
        '409':
          description: Cannot update storage profile that is in use.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update Storage Profile
      tags:
      - storage_profile
      x-resource: StorageProfile
      x-service: tf-api
  /tags:
    get:
      description: |
        This endpoint returns a list of tags.
      operationId: list_tags
      parameters:
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The resource type filter
        in: query
        name: filter[resource-type]
        required: false
        schema:
          type: string
      - description: The tag name filter
        in: query
        name: filter[name]
        required: false
        schema:
          type: string
      - description: The ID(s) of tag(s).
        in: query
        name: filter[tag]
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - name
            type: string
          type: array
      - description: Query string
        in: query
        name: query
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/list-tags-response.yml
              schema:
                $ref: '#/components/schemas/TagListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Tags
      tags:
      - tags
      x-resource: Tag
      x-service: tf-api
    post:
      description: |
        Create a new tag in the account.
      operationId: create_tag
      parameters: []
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/create-tag-request.yml
            schema:
              $ref: '#/components/schemas/TagDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/create-tag-response.yml
              schema:
                $ref: '#/components/schemas/TagDocument'
          description: Successfully created.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Relationship not found or user unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create a Tag
      tags:
      - tags
      x-resource: Tag
      x-service: tf-api
  /tags/{tag}:
    delete:
      description: The endpoint deletes tag by ID.
      operationId: delete_tag
      parameters:
      - description: The ID of the tag to delete.
        in: path
        name: tag
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Successfully deleted.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Tag not found.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete a Tag
      tags:
      - tags
      x-resource: Tag
      x-service: tf-api
    get:
      description: Show details of a specific tag.
      operationId: get_tag
      parameters:
      - description: |
          The ID of the tag to show.
        in: path
        name: tag
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/create-tag-response.yml
              schema:
                $ref: '#/components/schemas/TagDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Relationship not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get a Tag
      tags:
      - tags
      x-resource: Tag
      x-service: tf-api
    patch:
      description: This endpoint updates tag by ID.
      operationId: update_tag
      parameters:
      - description: |
          The ID of the tag to update.
        in: path
        name: tag
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/update-tag-request.yml
            schema:
              $ref: '#/components/schemas/TagDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/TagDocument'
          description: Successfully updated.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Tag not found.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update a Tag
      tags:
      - tags
      x-resource: Tag
      x-service: tf-api
  /teams:
    get:
      description: |
        The endpoint returns a list of [IAM](https://docs.scalr.io/docs/identity-and-access-management) teams.
        The endpoint supports filtering by team name (`filter[name]`), IdP (`filter[identity-provider]`)
        and team ID (`filter[team]=in:team-123,team-331`).
      operationId: get_teams
      parameters:
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The team name filter.
        in: query
        name: filter[name]
        required: false
        schema:
          type: string
      - description: The identity provider filter.
        in: query
        name: filter[identity-provider]
        required: false
        schema:
          type: string
      - description: The team filter.
        in: query
        name: filter[team]
        required: false
        schema:
          type: string
      - description: The user filter.
        in: query
        name: filter[user]
        required: false
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - account
            - identity-provider
            - users
            type: string
          type: array
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - identity-provider
            - name
            type: string
          type: array
      - description: Query string
        in: query
        name: query
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/list-teams.yml
              schema:
                $ref: '#/components/schemas/TeamListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Teams
      tags:
      - teams
      x-mcp-tool: true
      x-resource: Team
      x-service: tf-api
    post:
      description: |
        The endpoint creates an [IAM](https://docs.scalr.io/docs/identity-and-access-management) team.
        If an external IdP used, the team name must exist in that IdP.
      operationId: create_team
      parameters:
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - account
            - identity-provider
            - users
            type: string
          type: array
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/create-team-request.yml
            schema:
              $ref: '#/components/schemas/TeamDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/create-team-response.yml
              schema:
                $ref: '#/components/schemas/TeamDocument'
          description: Successfully created.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Relationship not found or user is not authorized to read it.
        '409':
          description: Quota exceeded error.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.)
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create a Team
      tags:
      - teams
      x-resource: Team
      x-service: tf-api
  /teams/{team}:
    delete:
      description: The endpoint deletes [IAM](https://docs.scalr.io/docs/identity-and-access-management) team by ID.
      operationId: delete_team
      parameters:
      - in: path
        name: team
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Successfully deleted.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Team not found.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete a Team
      tags:
      - teams
      x-resource: Team
      x-service: tf-api
    get:
      description: |
        This endpoint returns an [IAM](https://docs.scalr.io/docs/identity-and-access-management) team by ID.
      operationId: get_team
      parameters:
      - description: |
          The ID of the team.
        in: path
        name: team
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - account
            - identity-provider
            - users
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/get-team.yml
              schema:
                $ref: '#/components/schemas/TeamDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Team not found.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get a Team
      tags:
      - teams
      x-mcp-tool: true
      x-resource: Team
      x-service: tf-api
    patch:
      description: |
        Update a team's attributes or users.
        The endpoint can be used to add or remove users from a team.
        If the account uses an external identity provider without SCIM provisioning,
        team membership cannot be managed via this endpoint - the ``users`` relationship
        will be ignored. Use SCIM or manage team membership directly in the identity provider.
      operationId: update_team
      parameters:
      - in: path
        name: team
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - account
            - identity-provider
            - users
            type: string
          type: array
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/update-team-request.yml
            schema:
              $ref: '#/components/schemas/TeamDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/update-team-response.yml
              schema:
                $ref: '#/components/schemas/TeamDocument'
          description: Successfully updated.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Relationship not found or user unauthorized to read it.
        '409':
          description: Quota exceeded error.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.)
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update a Team
      tags:
      - teams
      x-resource: Team
      x-service: tf-api
  /test-configurations/{test_configuration}/provider-configuration-links:
    get:
      description: |
        This endpoint returns a list of Provider Configuration links to Module Test Configurations.
      operationId: list_module_test_provider_configuration_links
      parameters:
      - description: |
          The ID of the Module Test Configuration.
        in: path
        name: test_configuration
        required: true
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - provider-configuration
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ModuleTestProviderConfigurationLinkListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform action.
        '404':
          description: Module Test Configuration not found.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Module Test Provider Configuration Links
      tags:
      - module-test-provider-configuration-links
      x-resource: ModuleTestProviderConfigurationLink
      x-service: tf-api
    post:
      description: |
        Attach a Provider Configuration to the Module Test Configuration.
      operationId: create_module_test_provider_configuration_link
      parameters:
      - description: |
          The ID of the Module Test Configuration.
        in: path
        name: test_configuration
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/ModuleTestProviderConfigurationLinkDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ModuleTestProviderConfigurationLinkDocument'
          description: Created.
        '403':
          description: User unauthorized to perform action.
        '404':
          description: Module Test Configuration not found.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Attach a Provider Configuration to the Module Test Configuration
      tags:
      - module-test-provider-configuration-links
      x-resource: ModuleTestProviderConfigurationLink
      x-service: tf-api
  /usage-statistics:
    get:
      description: |
        This endpoint returns billing usage statistics for an account within a period of time.

        Required permission: accounts:billing
      operationId: list_usage_statistics
      parameters:
      - description: 'The date filter. Example: `filter[date]=between:2022-01-01T00:00:00Z,2022-02-01T00:00:00Z`'
        in: query
        name: filter[date]
        required: true
        schema:
          type: string
      - description: 'Filter data by account. This filter is applicable only for the parent control tower account. Example:
          `filter[account]=acc-ttpu7uslju6igv8`'
        in: query
        name: filter[account]
        required: false
        schema:
          type: string
      - description: Breakdown by environment or workspace.
        in: query
        name: breakdown_by
        required: false
        schema:
          enum:
          - account
          - environment
          - workspace
          type: string
      - description: Summarize usage statistics by the whole period.
        in: query
        name: total
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/list-usage-statistics.yml
              schema:
                $ref: '#/components/schemas/UsageStatisticListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform the action.
        '404':
          description: Account or environment not found.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Scalr Usage Statistics
      tags:
      - usage-statistics
      x-resource: UsageStatistic
      x-service: tf-api
  /users:
    get:
      description: |
        This endpoint returns a list of [IAM](https://docs.scalr.io/docs/identity-and-access-management) users.
        The response can be filtered by IdP: `filter[identity-provider]` or user ID: `filter[user]`.
      operationId: get_users
      parameters:
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The identity provider filter.
        in: query
        name: filter[identity-provider]
        required: false
        schema:
          type: string
      - description: User filter.
        in: query
        name: filter[user]
        required: false
        schema:
          type: string
      - description: Email filter.
        in: query
        name: filter[email]
        required: false
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - identity-providers
            - teams
            type: string
          type: array
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - created-at
            - email
            - full-name
            - last-login-at
            - status
            type: string
          type: array
      - description: Query string
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: Query by access on given scope.
        in: query
        name: access_query
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/list-users.yml
              schema:
                $ref: '#/components/schemas/UserListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Users
      tags:
      - users
      x-mcp-tool: true
      x-resource: User
      x-service: tf-api
    post:
      description: |
        Create a new [IAM](https://docs.scalr.io/docs/identity-and-access-management) user without access to any account.
        To invite user to the account /accounts/:id/actions/invite should be used.
      operationId: create_user
      parameters:
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - identity-providers
            type: string
          type: array
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/create-user-request.yml
            schema:
              $ref: '#/components/schemas/CreateUserDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/create-user-response.yml
              schema:
                $ref: '#/components/schemas/CreateUserDocument'
          description: Successfully created.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Relationship not found or user unauthorized.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create a User
      tags:
      - users
      x-resource: User
      x-service: tf-api
  /users/{user}:
    delete:
      description: The endpoint deletes [IAM](https://docs.scalr.io/docs/identity-and-access-management) user by ID.
      operationId: delete_user
      parameters:
      - description: The ID of the user to delete.
        in: path
        name: user
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Successfully deleted.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: User not found.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete a User
      tags:
      - users
      x-resource: User
      x-service: tf-api
    get:
      description: This endpoint returns an [IAM](https://docs.scalr.io/docs/identity-and-access-management) user by ID.
      operationId: get_user
      parameters:
      - description: The ID of the user.
        in: path
        name: user
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - identity-providers
            - teams
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/get-user.yml
              schema:
                $ref: '#/components/schemas/UserDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: User not found.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get a User
      tags:
      - users
      x-mcp-tool: true
      x-resource: User
      x-service: tf-api
    patch:
      description: This endpoint updates [IAM](https://docs.scalr.io/docs/identity-and-access-management) user by ID.
      operationId: update_user
      parameters:
      - description: The ID of the user to update.
        in: path
        name: user
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - identity-providers
            - teams
            type: string
          type: array
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/update-user-request.yml
            schema:
              $ref: '#/components/schemas/UserDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/update-user-response.yml
              schema:
                $ref: '#/components/schemas/UserDocument'
          description: Successfully updated.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: User not found.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update a User
      tags:
      - users
      x-resource: User
      x-service: tf-api
  /vars:
    get:
      description: |
        This endpoint returns a list of variables.

        Cloud Credentials are exposed as Terraform ENV Variables if filters are specified.
      operationId: get_variables
      parameters:
      - description: The ID of the environment to list variables for.
        in: query
        name: filter[environment]
        required: false
        schema:
          type: string
      - description: The ID of the workspace to list variables for.
        in: query
        name: filter[workspace]
        required: false
        schema:
          type: string
      - description: The variable category.
        in: query
        name: filter[category]
        required: false
        schema:
          type: string
      - description: The variable key.
        in: query
        name: filter[key]
        required: false
        schema:
          type: string
      - description: The ID(s) of variable(s).
        in: query
        name: filter[var]
        required: false
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - updated-by
            type: string
          type: array
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - key
            - updated-at
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/get-vars-response.yml
              schema:
                $ref: '#/components/schemas/VariableListingDocument'
          description: Success.
        '404':
          description: Workspace filter not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Variables
      tags:
      - variables
      x-mcp-tool: true
      x-resource: Variable
      x-service: tf-api
    post:
      description: Create a new terraform or ENV variable.
      operationId: create_variable
      parameters:
      - description: Enables the final variable to override variables from a lower scope.
        in: query
        name: force
        required: false
        schema:
          default: false
          type: boolean
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - updated-by
            type: string
          type: array
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              env-level:
                $ref: examples/create-environment-var-request.yml
              ws-level:
                $ref: examples/create-workspace-var-request.yml
            schema:
              $ref: '#/components/schemas/VariableDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/create-var-response.yml
              schema:
                $ref: '#/components/schemas/VariableDocument'
          description: Successfully created a variable.
        '404':
          description: Relationship not found, or user unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.)
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create a Variable
      tags:
      - variables
      x-mcp-tool: true
      x-resource: Variable
      x-service: tf-api
  /vars/{var}:
    delete:
      operationId: delete_variable
      parameters:
      - description: The ID of the variable to delete.
        in: path
        name: var
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Variable deleted.
        '404':
          description: Variable not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete a Variable
      tags:
      - variables
      x-resource: Variable
      x-service: tf-api
    get:
      description: |
        Show details of a specific variable.

        For `sensitive: true` variables, their actual `value` is not exposed,
        and `null` returned instead.
      operationId: get_variable
      parameters:
      - description: The ID of the variable to show.
        example: ws-t68bpgu1vetpdh8
        in: path
        name: var
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - updated-by
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            users:
              description: The comma-separated list of fields to return in response for User resource.
              type: string
            vars:
              description: The comma-separated list of fields to return in response for Variable resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/VariableDocument'
          description: Success.
        '404':
          description: Variable not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get a Variable
      tags:
      - variables
      x-mcp-tool: true
      x-resource: Variable
      x-service: tf-api
    patch:
      operationId: update_variable
      parameters:
      - description: The ID of the variable to update.
        in: path
        name: var
        required: true
        schema:
          type: string
      - description: Enables the final variable to override variables from a lower scope
        in: query
        name: force
        required: false
        schema:
          default: false
          type: boolean
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - updated-by
            type: string
          type: array
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/VariableDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/VariableDocument'
          description: Successfully updates the variable.
        '404':
          description: Variable not found, or user unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.)
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update a Variable
      tags:
      - variables
      x-resource: Variable
      x-service: tf-api
  /vcs-providers:
    get:
      description: |
        This endpoint returns a list of VCS providers by various filters.

        To list VCS providers accessible from a specific environment - `filter[environment]`,
        or when from a specific account - `filter[account]` has to be specified.

        For self-hosted Scalr there's also an option to list all VCS providers created globally
        - both `filter[account]=null` and `filter[environment]=null` has to be specified.

        If no `environment` or `account` filters were specified, all VCS providers to which a
        current user has read access will be returned.
      operationId: list_vcs_providers
      parameters:
      - description: Full text search based on a VCS provider's `name`
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The ID of the VCS provider. Multiple values are allowed through COMMA `,`
        in: query
        name: filter[vcs-provider]
        required: false
        schema:
          type: string
      - description: Filter by VCS type
        in: query
        name: filter[vcs-type]
        required: false
        schema:
          type: string
      - description: Filter by VCS name
        in: query
        name: filter[name]
        required: false
        schema:
          type: string
      - description: The environment filter
        in: query
        name: filter[environment]
        required: false
        schema:
          type: string
      - description: The account filter
        in: query
        name: filter[account]
        required: false
        schema:
          type: string
      - description: The agent pool filter
        in: query
        name: filter[agent-pool]
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - name
            - vcs-type
            type: string
          type: array
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - agent-pool
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            agent-pools:
              description: The comma-separated list of fields to return in response for AgentPool resource.
              type: string
            vcs-providers:
              description: The comma-separated list of fields to return in response for VcsProvider resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/get-vcs-providers.yml
              schema:
                $ref: '#/components/schemas/VcsProviderListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform action.
        '404':
          description: Account or environment not found.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List VCS Providers
      tags:
      - vcs-providers
      x-mcp-tool: true
      x-resource: VcsProvider
      x-service: tf-api
    post:
      description: |
        Create a new VCS connection between Scalr and a VCS provider.

        VCS providers can be created at the Scalr account. Self-hosted Scalr also supports
        the creation of global VCS providers. If a VCS provider is created globally, all accounts
        within the self-hosted installation will have access to use the VCS provider.

        Only VCS providers with `personal_token` auth type, can be created through the API.
        If you need to set up `oauth2` provider, you should use Scalr
        [web interface](/docs/github) to do this.
      operationId: create_vcs_provider
      parameters: []
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/create-vcs-provider-request.yml
            schema:
              $ref: '#/components/schemas/VcsProviderDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/create-vcs-provider-response.yml
              schema:
                $ref: '#/components/schemas/VcsProviderDocument'
          description: Created.
        '403':
          description: User unauthorized to perform action.
        '404':
          description: Relationship resource not found, or user unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create a VCS Provider
      tags:
      - vcs-providers
      x-resource: VcsProvider
      x-service: tf-api
  /vcs-providers/{vcs_provider}:
    delete:
      description: The endpoint deletes a VCS provider by ID.
      operationId: delete_vcs_provider
      parameters:
      - in: path
        name: vcs_provider
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Deleted.
        '404':
          description: VCS provider not found or user unauthorized.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete a VCS Provider
      tags:
      - vcs-providers
      x-resource: VcsProvider
      x-service: tf-api
    get:
      description: Show details of a specific VCS provider.
      operationId: get_vcs_provider
      parameters:
      - description: The ID of the VCS provider.
        in: path
        name: vcs_provider
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - agent-pool
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            agent-pools:
              description: The comma-separated list of fields to return in response for AgentPool resource.
              type: string
            vcs-providers:
              description: The comma-separated list of fields to return in response for VcsProvider resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/get-vcs-provider.yml
              schema:
                $ref: '#/components/schemas/VcsProviderDocument'
          description: Success.
        '404':
          description: VCS provider not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get a VCS Provider
      tags:
      - vcs-providers
      x-mcp-tool: true
      x-resource: VcsProvider
      x-service: tf-api
    patch:
      description: |
        This endpoint allows updates to attributes of an existing VCS provider.
      operationId: update_vcs_provider
      parameters:
      - description: The ID of the VCS provider to update.
        in: path
        name: vcs_provider
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/update-vcs-provider-request.yml
            schema:
              $ref: '#/components/schemas/VcsProviderDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/VcsProviderDocument'
          description: Updated.
        '403':
          description: User unauthorized to perform action.
        '404':
          description: Relationship resource not found, or user unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update a VCS Provider
      tags:
      - vcs-providers
      x-resource: VcsProvider
      x-service: tf-api
  /vcs-tasks:
    post:
      operationId: create_vcs_task
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VcsTaskRequest'
      responses:
        '202':
          description: Task is created.
        '404':
          description: VCS-driven workspaces not found.
        '409':
          description: Conflict creating task.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create a task to queue runs from the commit for VCS-driven workspaces.
      tags:
      - vcs-tasks
      x-resource: null
      x-service: tf-api
  /workload-identity-providers:
    get:
      description: |
        List Workload Identity Providers.
      operationId: list_workload_identity_providers
      parameters:
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - name
            - url
            type: string
          type: array
      - description: Query string
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: The workload identity provider name filter.
        in: query
        name: filter[name]
        required: false
        schema:
          type: string
      - description: The workload identity provider url filter.
        in: query
        name: filter[url]
        required: false
        schema:
          type: string
      - description: The ID(s) of workload identity provider(s).
        in: query
        name: filter[workload-identity-provider]
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/WorkloadIdentityProviderListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Workload Identity Providers
      tags:
      - workload-identity-providers
      x-mcp-tool: true
      x-resource: WorkloadIdentityProvider
      x-service: tf-api
    post:
      description: |
        Create a new Workload Identity Provider.
      operationId: create_workload_identity_provider
      parameters: []
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/WorkloadIdentityProviderDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/WorkloadIdentityProviderDocument'
          description: Created.
        '403':
          description: User unauthorized to perform action.
        '404':
          description: Relationship resource not found, or user unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create a Workload Identity Provider
      tags:
      - workload-identity-providers
      x-resource: WorkloadIdentityProvider
      x-service: tf-api
  /workload-identity-providers/{workload_identity_provider}:
    delete:
      description: The endpoint deletes a Workload identity provider by ID.
      operationId: delete_workload_identity_provider
      parameters:
      - description: The ID of the Workload identity provider.
        in: path
        name: workload_identity_provider
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Deleted.
        '404':
          description: Workload identity provider not found or user unauthorized.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete a Workload identity provider
      tags:
      - workload-identity-providers
      x-resource: WorkloadIdentityProvider
      x-service: tf-api
    get:
      description: |
        Get Workload Identity Provider.
      operationId: get_workload_identity_provider
      parameters:
      - description: The ID of the Workload identity provider.
        in: path
        name: workload_identity_provider
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/WorkloadIdentityProviderDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get Workload Identity Provider
      tags:
      - workload-identity-providers
      x-mcp-tool: true
      x-resource: WorkloadIdentityProvider
      x-service: tf-api
    patch:
      description: |
        This endpoint updates attributes of an existing Workload Identity Provider.
      operationId: update_workload_identity_provider
      parameters:
      - description: |
          The ID of the Workload Identity Provider to update.
        in: path
        name: workload_identity_provider
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/WorkloadIdentityProviderDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/WorkloadIdentityProviderDocument'
          description: Updated.
        '403':
          description: User unauthorized to perform action.
        '404':
          description: Resource not found, or user unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update a Workload Identity Provider
      tags:
      - workload-identity-providers
      x-resource: WorkloadIdentityProvider
      x-service: tf-api
  /workspaces:
    get:
      operationId: get_workspaces
      parameters:
      - description: The ID of the Environment
        in: query
        name: filter[environment]
        required: false
        schema:
          type: string
      - description: The ID(s) of the Workspace.
        in: query
        name: filter[workspace]
        required: false
        schema:
          type: string
      - description: The ID of the Account
        in: query
        name: filter[account]
        required: false
        schema:
          type: string
      - description: The ID of the User who created this workspace
        in: query
        name: filter[created-by]
        required: false
        schema:
          type: string
      - description: Workspace name
        in: query
        name: filter[name]
        required: false
        schema:
          type: string
      - description: Workspace environment type
        in: query
        name: filter[environment-type]
        required: false
        schema:
          type: string
      - description: Last run status
        in: query
        name: filter[run][status]
        required: false
        schema:
          type: string
      - description: Last run created by filter
        in: query
        name: filter[run][created-by]
        required: false
        schema:
          type: string
      - description: The ID(s) of the Agent Pool.
        in: query
        name: filter[agent-pool]
        required: false
        schema:
          type: string
      - description: The ID of the Software Version
        in: query
        name: filter[software-version]
        required: false
        schema:
          type: string
      - description: The ID of the Provider configuration.
        in: query
        name: filter[provider-configuration]
        required: false
        schema:
          type: string
      - description: The ID of the VCS provider
        in: query
        name: filter[vcs-provider]
        required: false
        schema:
          type: string
      - description: The ID of the Environment that got access to workspaces through federation.
        in: query
        name: filter[federated-to-env]
        required: false
        schema:
          type: string
      - description: The ID of the Environment that gives access to workspaces through federation.
        in: query
        name: filter[federated-by-env]
        required: false
        schema:
          type: string
      - description: Filter by VCS repository
        in: query
        name: filter[vcs-repo][identifier]
        required: false
        schema:
          type: string
      - description: Filter by remote state consumer source Workspace ID.
        in: query
        name: filter[state-consumer-of]
        required: false
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: Query string, search by id, name.
        in: query
        name: query
        required: false
        schema:
          type: string
      - description: Date of workspace modification.
        in: query
        name: filter[updated-at]
        required: false
        schema:
          type: string
      - description: Deletion protection enabled filter
        in: query
        name: filter[deletion-protection-enabled]
        required: false
        schema:
          type: string
      - description: Has resources filter
        in: query
        name: filter[has-resources]
        required: false
        schema:
          type: string
      - description: The ID of the User who update this workspace
        in: query
        name: filter[updated-by]
        required: false
        schema:
          type: string
      - description: Filter workspaces by tags
        in: query
        name: filter[tag]
        required: false
        schema:
          type: string
      - description: Filter the workspaces by last run drifted resources count.
        in: query
        name: filter[run][resource-drifts]
        required: false
        schema:
          type: string
      - description: Filter workspaces by favorite status. Set to 'true' to show only favorites, 'false' to exclude favorites.
        in: query
        name: filter[favorite]
        required: false
        schema:
          type: string
      - description: The name of the Environment
        in: query
        name: filter[environment][name]
        required: false
        schema:
          type: string
      - description: When set to 'true', favorite workspaces are shown first, followed by non-favorites. Both groups respect
          the main sort order.
        in: query
        name: sort[favorite-first]
        required: false
        schema:
          type: string
      - description: Is drift detection enabled
        in: query
        name: filter[drift-detection-enabled]
        required: false
        schema:
          type: boolean
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - agent-pool
            - configuration-version
            - created-by
            - current-run
            - drift-report
            - environment
            - latest-configuration-version
            - latest-run
            - locked-by
            - locked-by-run
            - module
            - module-version
            - readme-id
            - tags
            - updated-by
            - vcs-provider
            type: string
          type: array
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - current-run
            - environment
            - latest-run
            - name
            - updated-at
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            agent-pools:
              description: The comma-separated list of fields to return in response for AgentPool resource.
              type: string
            configuration-versions:
              description: The comma-separated list of fields to return in response for ConfigurationVersion resource.
              type: string
            drift-reports:
              description: The comma-separated list of fields to return in response for DriftReport resource.
              type: string
            environments:
              description: The comma-separated list of fields to return in response for Environment resource.
              type: string
            module-versions:
              description: The comma-separated list of fields to return in response for ModuleVersion resource.
              type: string
            modules:
              description: The comma-separated list of fields to return in response for Module resource.
              type: string
            runs:
              description: The comma-separated list of fields to return in response for Run resource.
              type: string
            tags:
              description: The comma-separated list of fields to return in response for Tag resource.
              type: string
            users:
              description: The comma-separated list of fields to return in response for User resource.
              type: string
            vcs-providers:
              description: The comma-separated list of fields to return in response for VcsProvider resource.
              type: string
            workspace-readme:
              description: The comma-separated list of fields to return in response for WorkspaceReadme resource.
              type: string
            workspaces:
              description: The comma-separated list of fields to return in response for Workspace resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/WorkspaceListingDocument'
          description: Success.
        '404':
          description: Environment not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Workspaces
      tags:
      - workspaces
      x-mcp-tool: true
      x-resource: Workspace
      x-service: tf-api
    post:
      description: |
        Workspaces represent a unit of infrastructure managed by terraform.

        To create a workspace you must pass `name` attribute and `environment` relationship.

        A workspace might be linked to a VCS repository, so that any git push will trigger a terraform Run
        in the workspace.
      operationId: create_workspace
      parameters: []
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              tags:
                $ref: examples/create-workspace-request-tags.yml
              vcs:
                $ref: examples/create-workspace-request-vcs.yml
              vcs-less:
                $ref: examples/create-workspace-request-vcs-less.yml
            schema:
              $ref: '#/components/schemas/WorkspaceDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/create-workspace-response.yml
              schema:
                $ref: '#/components/schemas/WorkspaceDocument'
          description: Success.
        '404':
          description: Environment not found, or user unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create a Workspace
      tags:
      - workspaces
      x-mcp-tool: true
      x-resource: Workspace
      x-service: tf-api
  /workspaces/{workspace}:
    delete:
      operationId: delete_workspace
      parameters:
      - description: The ID of the workspace to be deleted.
        in: path
        name: workspace
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Successfully deleted the workspace.
        '404':
          description: Workspace not found, or user unauthorized to perform action.
        '409':
          description: |-
            Workspace can't be deleted because it has managed resources
            and deletion protection is enabled.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete a Workspace
      tags:
      - workspaces
      x-resource: Workspace
      x-service: tf-api
    get:
      description: Show details of a specific workspace.
      operationId: get_workspace
      parameters:
      - description: The workspace ID to show.
        in: path
        name: workspace
        required: true
        schema:
          type: string
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - agent-pool
            - configuration-version
            - created-by
            - current-run
            - drift-report
            - environment
            - latest-configuration-version
            - latest-run
            - locked-by
            - locked-by-run
            - module
            - module-version
            - readme-id
            - tags
            - updated-by
            - vcs-provider
            type: string
          type: array
      - description: The value of the fields[resource-type] parameter is a comma-separated list that refers to the name of
          the fields to be returned for the resource. An empty value indicates that no fields should be returned.
        explode: true
        in: query
        name: fields
        required: false
        schema:
          properties:
            agent-pools:
              description: The comma-separated list of fields to return in response for AgentPool resource.
              type: string
            configuration-versions:
              description: The comma-separated list of fields to return in response for ConfigurationVersion resource.
              type: string
            drift-reports:
              description: The comma-separated list of fields to return in response for DriftReport resource.
              type: string
            environments:
              description: The comma-separated list of fields to return in response for Environment resource.
              type: string
            module-versions:
              description: The comma-separated list of fields to return in response for ModuleVersion resource.
              type: string
            modules:
              description: The comma-separated list of fields to return in response for Module resource.
              type: string
            runs:
              description: The comma-separated list of fields to return in response for Run resource.
              type: string
            tags:
              description: The comma-separated list of fields to return in response for Tag resource.
              type: string
            users:
              description: The comma-separated list of fields to return in response for User resource.
              type: string
            vcs-providers:
              description: The comma-separated list of fields to return in response for VcsProvider resource.
              type: string
            workspace-readme:
              description: The comma-separated list of fields to return in response for WorkspaceReadme resource.
              type: string
            workspaces:
              description: The comma-separated list of fields to return in response for Workspace resource.
              type: string
          type: object
        style: deepObject
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/WorkspaceDocument'
          description: Success.
        '404':
          description: Workspace not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get a Workspace
      tags:
      - workspaces
      x-mcp-tool: true
      x-resource: Workspace
      x-service: tf-api
    patch:
      operationId: update_workspace
      parameters:
      - description: The ID of the workspace to be updated.
        in: path
        name: workspace
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/WorkspaceDocument'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/WorkspaceDocument'
          description: Success.
        '404':
          description: Workspace not found, or user unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Update a Workspace
      tags:
      - workspaces
      x-resource: Workspace
      x-service: tf-api
  /workspaces/{workspace}/actions/favorite:
    post:
      description: Add a workspace to the current user's favorites.
      operationId: add_workspace_to_favorites
      parameters:
      - description: The ID of the workspace.
        in: path
        name: workspace
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/WorkspaceDocument'
          description: Success.
        '404':
          description: Workspace not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Favorite a workspace
      tags:
      - favorite-workspaces
      x-resource: Workspace
      x-service: tf-api
  /workspaces/{workspace}/actions/lock:
    post:
      description: This endpoint locks a workspace.
      operationId: lock_workspace
      parameters:
      - description: The workspace ID to lock.
        in: path
        name: workspace
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Reason'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/WorkspaceDocument'
          description: Successfully locked the workspace.
        '404':
          description: Workspace not found, or user unauthorized to perform action.
        '409':
          description: Workspace already locked.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Lock a Workspace
      tags:
      - workspaces
      x-resource: Workspace
      x-service: tf-api
  /workspaces/{workspace}/actions/resync:
    post:
      description: |-
        This endpoint triggers a Configuration Version resync for a Workspace
        associated with a VCS repository.
      operationId: resync_workspace
      parameters:
      - description: The ID of the workspace to resync.
        in: path
        name: workspace
        required: true
        schema:
          type: string
      responses:
        '201':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ConfigurationVersionDocument'
          description: Success.
        '404':
          description: Workspace not found or user unauthorized to perform action.
        '409':
          description: Workspace is not bound to any repository.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Resync a Workspace
      tags:
      - workspaces
      x-resource: Workspace
      x-service: tf-api
  /workspaces/{workspace}/actions/set-schedule:
    post:
      operationId: set_schedule
      parameters:
      - description: The ID of the workspace to be updated.
        in: path
        name: workspace
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspaceSchedule'
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/WorkspaceDocument'
          description: Success.
        '404':
          description: Workspace not found, or user unauthorized to perform action.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Set scheduled runs for the workspace
      tags:
      - workspaces
      x-resource: Workspace
      x-service: tf-api
  /workspaces/{workspace}/actions/unfavorite:
    post:
      description: Remove a workspace from the current user's favorites.
      operationId: remove_workspace_from_favorites
      parameters:
      - description: The ID of the workspace.
        in: path
        name: workspace
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/WorkspaceDocument'
          description: Success.
        '404':
          description: Workspace not found or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Unfavorite a workspace
      tags:
      - favorite-workspaces
      x-resource: Workspace
      x-service: tf-api
  /workspaces/{workspace}/actions/unlock:
    post:
      description: This endpoint unlocks a workspace.
      operationId: unlock_workspace
      parameters:
      - description: The workspace ID to unlock.
        in: path
        name: workspace
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/WorkspaceDocument'
          description: Successfully unlocked the workspace.
        '404':
          description: Workspace not found, or user unauthorized to perform action.
        '409':
          description: Workspace already unlocked, or locked by a different user.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Unlock a Workspace
      tags:
      - workspaces
      x-resource: Workspace
      x-service: tf-api
  /workspaces/{workspace}/current-state-version:
    get:
      description: |-
        Fetch the current state version for the given workspace.

        This state version will be the input state when running terraform operations.
      operationId: get_current_state_version
      parameters:
      - description: The ID of the workspace.
        in: path
        name: workspace
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/StateVersionDocument'
          description: Successfully returned current state version for the given workspace.
        '404':
          description: |-
            Workspace not found, workspace does not have a current state version,
            or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Get Workspace's Current State Version
      tags:
      - state-versions
      x-resource: StateVersion
      x-service: tf-api
  /workspaces/{workspace}/outputs:
    get:
      description: |
        This endpoint returns a list of outputs from current state version run output.
      operationId: get_workspace_outputs
      parameters:
      - description: |
          The workspace to list outputs for.
        in: path
        name: workspace
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              examples:
                default:
                  $ref: examples/list-workspace-outputs-response.yml
              schema:
                $ref: '#/components/schemas/WorkspaceOutputFieldsetsListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List workspace's outputs.
      tags:
      - workspaces
      x-resource: Workspace
      x-service: tf-api
  /workspaces/{workspace}/provider-configuration-links:
    get:
      description: |
        This endpoint returns a list of Provider configuration links or configurations that are used during the workspace runs.
      operationId: list_provider_configuration_links
      parameters:
      - description: |
          The ID of the Workspace.
        in: path
        name: workspace
        required: true
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      - description: The comma-separated list of attributes.
        explode: false
        in: query
        name: sort
        required: false
        schema:
          items:
            enum:
            - name
            type: string
          type: array
      - description: The comma-separated list of relationship paths.
        explode: false
        in: query
        name: include
        required: false
        schema:
          items:
            enum:
            - provider-configuration
            type: string
          type: array
      responses:
        '200':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ProviderConfigurationLinkListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform action.
        '404':
          description: Workspace not found.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List Provider configuration workspace links
      tags:
      - provider-configuration-links
      x-resource: ProviderConfigurationLink
      x-service: tf-api
    post:
      description: |
        Attach a Provider configuration to the workspace.
      operationId: create_provider_configuration_link
      parameters:
      - description: |
          The ID of the Workspace.
        in: path
        name: workspace
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/ProviderConfigurationLinkDocument'
      responses:
        '201':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ProviderConfigurationLinkDocument'
          description: Created.
        '403':
          description: User unauthorized to perform action.
        '404':
          description: Workspace or Provider configuration not found.
        '422':
          description: Malformed request body (missing attributes, wrong types, etc.).
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Attach a Provider configuration to the workspace
      tags:
      - provider-configuration-links
      x-resource: ProviderConfigurationLink
      x-service: tf-api
  /workspaces/{workspace}/relationships/remote-state-consumers:
    delete:
      description: |
        This endpoint removes provided workspaces
        from a list of allowed remote state consumers for a given workspace.
      operationId: delete_remote_state_consumers
      parameters:
      - description: |
          The ID of the workspace.
        in: path
        name: workspace
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/add-remote-state-consumers-request.yml
            schema:
              $ref: '#/components/schemas/RemoteStateConsumerRelationshipFieldsetsListingDocument'
      responses:
        '204':
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Workspace not found, or user unauthorized to perform action.
        '409':
          description: Not allowed. `global-remote-state` is enabled for the workspace.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete remote state consumers
      tags:
      - remote-state-consumers
      x-resource: Workspace
      x-service: tf-api
    get:
      description: |
        This endpoint returns a list of other workspaces
        that that were explicitly added as state consumers for given workspace.
      operationId: list_remote_state_consumers
      parameters:
      - description: |
          The ID of the workspace.
        in: path
        name: workspace
        required: true
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/list-remote-state-consumers-response.yml
              schema:
                $ref: '#/components/schemas/RemoteStateConsumerRelationshipFieldsetsListingDocument'
          description: Request was successful.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Workspace not found, or user unauthorized to perform action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List remote state consumers
      tags:
      - remote-state-consumers
      x-resource: Workspace
      x-service: tf-api
    patch:
      description: |
        This endpoint replaces a list of allowed remote state consumers for a given workspace.
      operationId: replace_remote_state_consumers
      parameters:
      - description: |
          The ID of the workspace.
        in: path
        name: workspace
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/add-remote-state-consumers-request.yml
              empty:
                $ref: examples/replace-remote-state-consumers-empty-request.yml
            schema:
              $ref: '#/components/schemas/RemoteStateConsumerRelationshipFieldsetsListingDocument'
      responses:
        '204':
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Workspace not found, or user unauthorized to perform action.
        '409':
          description: Not allowed. `global-remote-state` is enabled for the workspace.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Replace remote state consumers
      tags:
      - remote-state-consumers
      x-resource: Workspace
      x-service: tf-api
    post:
      description: |
        This endpoint adds provided workspaces
        to a list of allowed remote state consumers for a given workspace.
      operationId: add_remote_state_consumers
      parameters:
      - description: |
          The ID of the workspace.
        in: path
        name: workspace
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/add-remote-state-consumers-request.yml
            schema:
              $ref: '#/components/schemas/RemoteStateConsumerRelationshipFieldsetsListingDocument'
      responses:
        '204':
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        '404':
          description: Workspace not found, or user unauthorized to perform action.
        '409':
          description: Not allowed. `global-remote-state` is enabled for the workspace.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Add remote state consumers
      tags:
      - remote-state-consumers
      x-resource: Workspace
      x-service: tf-api
  /workspaces/{workspace}/relationships/tags:
    delete:
      description: |
        This endpoint removes given [tags](tags.html#the-tag-resource) from the workspace.
      operationId: delete_workspace_tags
      parameters:
      - description: |
          The workspace whose tags will be deleted.
        in: path
        name: workspace
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/update-resource-tags-request.yml
            schema:
              $ref: '#/components/schemas/TagRelationshipFieldsetsListingDocument'
      responses:
        '204':
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete workspace's tags
      tags:
      - workspaces
      x-resource: Workspace
      x-service: tf-api
    get:
      description: |
        This endpoint returns a list of [tags](tags.html#the-tag-resource),
        assigned to a workspace.
      operationId: list_workspace_tags
      parameters:
      - description: |
          The workspace to list tags for.
        in: path
        name: workspace
        required: true
        schema:
          type: string
      - description: Page number
        in: query
        name: page[number]
        required: false
        schema:
          type: string
      - description: Page size
        in: query
        name: page[size]
        required: false
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.api+json:
              examples:
                default:
                  $ref: examples/list-workspace-tags-response.yml
              schema:
                $ref: '#/components/schemas/TagRelationshipFieldsetsListingDocument'
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: List workspace's tags
      tags:
      - workspaces
      x-resource: Workspace
      x-service: tf-api
    patch:
      description: |
        This endpoint completely replaces workspace's tags with provided list.
      operationId: replace_workspace_tags
      parameters:
      - description: |
          The workspace whose tags will be replaced.
        in: path
        name: workspace
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/update-resource-tags-request.yml
              empty:
                $ref: examples/replace-resource-tags-empty-request.yml
            schema:
              $ref: '#/components/schemas/TagRelationshipFieldsetsListingDocument'
      responses:
        '204':
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Replace workspace's tags
      tags:
      - workspaces
      x-resource: Workspace
      x-service: tf-api
    post:
      description: |
        This endpoint assigns the list of [tags](tags.html#the-tag-resource) to the workspace.
      operationId: add_workspace_tags
      parameters:
      - description: |
          The workspace to add the tags to.
        in: path
        name: workspace
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/vnd.api+json:
            examples:
              default:
                $ref: examples/update-resource-tags-request.yml
            schema:
              $ref: '#/components/schemas/TagRelationshipFieldsetsListingDocument'
      responses:
        '204':
          description: Success.
        '403':
          description: User unauthorized to perform this action.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Add tags to the workspace
      tags:
      - workspaces
      x-resource: Workspace
      x-service: tf-api
  /workspaces/{workspace}/ssh-key-links:
    delete:
      description: |
        Deletes a link between a workspace and an SSH key.
      operationId: delete_workspace_ssh_key_link
      parameters:
      - in: path
        name: workspace
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Deleted.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Delete a link between a workspace and an SSH key
      tags:
      - ssh-key-links
      x-resource: null
      x-service: tf-api
    post:
      description: |
        Creates a link between a workspace and an SSH key.
      operationId: create_workspace_ssh_key_link
      parameters:
      - in: path
        name: workspace
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkspaceSSHKeyLinkRequest'
      responses:
        '201':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/WorkspaceDocument'
          description: Created.
        4XX:
          description: Client error.
        5XX:
          description: Server error.
      summary: Create a link between a workspace and an SSH key
      tags:
      - ssh-key-links
      x-resource: null
      x-service: tf-api
security:
- API-Key: []
servers:
- url: https://{Domain}/api/iacp/v3
  variables:
    Domain:
      default: example.scalr.io
      description: Domain where Scalr is hosted
