---
title: "POST /v1/agentspaces/{agentSpaceId}/associations"
method: POST
path: "/v1/agentspaces/{agentSpaceId}/associations"
---

# POST /v1/agentspaces/{agentSpaceId}/associations

`POST /v1/agentspaces/{agentSpaceId}/associations`

Adds a specific service association to an AgentSpace. It overwrites the existing association of the same service. Returns 201 Created on success.

## Path parameters

- `agentSpaceId` string, required — Unique identifier for an agent space (allows alphanumeric characters and hyphens; 1-64 characters)

## Request body

- object
  - `serviceId` string, required — Unique identifier for a registered service
  - `configuration` object, required — Union of all supported service configuration types. Each service has its own specific configuration structure.
    - `sourceAws` object — AWS source account configuration for monitoring resources.
      - `accountId` string, required — AWS Account Id corresponding to provided resources.
      - `accountType` 'source', required — Account Type 'source' for AIDevOps monitoring.
      - `assumableRoleArn` string, required — Role ARN to be assumed by AIDevOps to operate on behalf of customer.
      - `externalId` string — External ID for additional security when assuming the role. Used to prevent the confused deputy problem.
    - `aws` object — AWS monitor account configuration.
      - `assumableRoleArn` string, required — Role ARN to be assumed by AIDevOps to operate on behalf of customer.
      - `accountId` string, required — AWS Account Id corresponding to provided resources.
      - `accountType` 'monitor', required — Account Type 'monitor' for AIDevOps monitoring.
    - `github` object — GitHub repository integration configuration.
      - `repoName` string, required — Associated Github repo name
      - `repoId` string, required — Associated Github repo ID
      - `owner` string, required — The GitHub repository owner name.
      - `ownerType` 'organization' | 'user', required — Type of GitHub repository owner.
      - `instanceIdentifier` string — GitHub instance identifier (e.g., github.com or github.enterprise.com)
      - `runtimeRoleArn` string — Optional role ARN that AIDevOps assumes at runtime for automatic verification testing and VPC connectivity on this association.
    - `slack` object — Slack workspace integration configuration.
      - `workspaceId` string, required — Associated Slack workspace ID
      - `workspaceName` string, required — Associated Slack workspace name
      - `transmissionTarget` object, required — Transmission targets for agent notifications
        - `opsOncallTarget` object, required — Destination for On-call Agent (Ops1)
          - `channelName` string — Slack channel name
          - `channelId` string, required — Slack channel ID
        - `opsSRETarget` object — Destination for SRE Agent (Ops1.5)
          - `channelName` string — Slack channel name
          - `channelId` string, required — Slack channel ID
    - `dynatrace` object — Dynatrace monitoring integration configuration.
      - `envId` string, required — Dynatrace environment id
      - `resources` String[] — List of Dynatrace resources to monitor
    - `servicenow` object — ServiceNow instance integration configuration.
      - `instanceId` string — ServiceNow instance ID
      - `authScopes` String[] — Scoped down authentication scopes for fine grained control
    - `mcpservernewrelic` object — NewRelic instance integration configuration.
      - `accountId` string, required — New Relic Account ID
      - `endpoint` string, required — MCP server endpoint URL (e.g., https://mcp.newrelic.com/mcp/)
    - `mcpserverdatadog` object — Datadog MCP server integration configuration.
    - `mcpserver` object — MCP (Model Context Protocol) server integration configuration.
      - `tools` MCPToolsListMemberString[], required — List of MCP tools can be used with the association.
    - `gitlab` object — GitLab project integration configuration.
      - `projectId` string, required — GitLab numeric project ID.
      - `projectPath` string, required — Full GitLab project path (e.g., namespace/project-name).
      - `instanceIdentifier` string — GitLab instance identifier (e.g., gitlab.com or e2e.gamma.dev.us-east-1.gitlab.falco.ai.aws.dev)
      - `runtimeRoleArn` string — Optional role ARN that AIDevOps assumes at runtime for automatic verification testing and VPC connectivity on this association.
    - `mcpserversplunk` object — Splunk MCP server integration configuration.
    - `eventChannel` object — Event Channel instance integration configuration.
    - `azure` object — Azure subscription integration configuration.
      - `subscriptionId` string, required — Azure subscription ID corresponding to provided resources.
    - `azuredevops` object — Azure DevOps project integration configuration.
      - `organizationName` string, required — Azure DevOps organization name.
      - `projectId` string, required — Azure DevOps project ID.
      - `projectName` string, required — Azure DevOps project name.
    - `mcpservergrafana` object — Grafana MCP server integration configuration.
      - `endpoint` string, required — Grafana instance URL (e.g., https://your-instance.grafana.net)
      - `organizationId` string — The Grafana organization ID that can be used.
      - `tools` MCPToolsListMemberString[] — List of MCP tools that can be used.
    - `pagerduty` object — PagerDuty integration configuration
      - `services` String[], required — List of Pagerduty service available for the association.
      - `customerEmail` string, password, required — Email to be used in Pagerduty API header
    - `mcpserversigv4` object — SigV4-authenticated MCP server integration configuration.
      - `tools` MCPToolsListMemberString[], required — List of MCP tools available for the association.
    - `remoteagent` object — Remote A2A agent integration configuration (token-based auth).
    - `remoteagentsigv4` object — Remote A2A agent integration configuration (SigV4 auth).
  - `capabilities` object — Per-capability enablement for the AWS DevOps Agent. Absent capability = disabled.

## Response `201`

Success

- AssociateServiceOutput — Output containing the newly created association and optional webhook configuration.
  - `association` Association, required — Represents a service association within an AgentSpace, defining how the agent interacts with external services.
    - `agentSpaceId` string, required — The unique identifier of the AgentSpace
    - `createdAt` string, date-time, required — The timestamp when the resource was created.
    - `updatedAt` string, date-time, required — The timestamp when the resource was last updated.
    - `status` 'valid' | 'invalid' | 'pending-confirmation' — Validation status
    - `associationId` string, required — The unique identifier of the given association.
    - `serviceId` string, required — The identifier for associated service
    - `configuration` object, required — The configuration that directs how AgentSpace interacts with the given service.
      - `sourceAws` object — AWS source account configuration for monitoring resources.
        - `accountId` string, required — AWS Account Id corresponding to provided resources.
        - `accountType` 'source', required — Account Type 'source' for AIDevOps monitoring.
        - `assumableRoleArn` string, required — Role ARN to be assumed by AIDevOps to operate on behalf of customer.
        - `externalId` string — External ID for additional security when assuming the role. Used to prevent the confused deputy problem.
      - `aws` object — AWS monitor account configuration.
        - `assumableRoleArn` string, required — Role ARN to be assumed by AIDevOps to operate on behalf of customer.
        - `accountId` string, required — AWS Account Id corresponding to provided resources.
        - `accountType` 'monitor', required — Account Type 'monitor' for AIDevOps monitoring.
      - `github` object — GitHub repository integration configuration.
        - `repoName` string, required — Associated Github repo name
        - `repoId` string, required — Associated Github repo ID
        - `owner` string, required — The GitHub repository owner name.
        - `ownerType` 'organization' | 'user', required — Type of GitHub repository owner.
        - `instanceIdentifier` string — GitHub instance identifier (e.g., github.com or github.enterprise.com)
        - `runtimeRoleArn` string — Optional role ARN that AIDevOps assumes at runtime for automatic verification testing and VPC connectivity on this association.
      - `slack` object — Slack workspace integration configuration.
        - `workspaceId` string, required — Associated Slack workspace ID
        - `workspaceName` string, required — Associated Slack workspace name
        - `transmissionTarget` object, required — Transmission targets for agent notifications
          - `opsOncallTarget` object, required — Destination for On-call Agent (Ops1)
            - `channelName` string — Slack channel name
            - `channelId` string, required — Slack channel ID
          - `opsSRETarget` object — Destination for SRE Agent (Ops1.5)
            - `channelName` string — Slack channel name
            - `channelId` string, required — Slack channel ID
      - `dynatrace` object — Dynatrace monitoring integration configuration.
        - `envId` string, required — Dynatrace environment id
        - `resources` String[] — List of Dynatrace resources to monitor
      - `servicenow` object — ServiceNow instance integration configuration.
        - `instanceId` string — ServiceNow instance ID
        - `authScopes` String[] — Scoped down authentication scopes for fine grained control
      - `mcpservernewrelic` object — NewRelic instance integration configuration.
        - `accountId` string, required — New Relic Account ID
        - `endpoint` string, required — MCP server endpoint URL (e.g., https://mcp.newrelic.com/mcp/)
      - `mcpserverdatadog` object — Datadog MCP server integration configuration.
      - `mcpserver` object — MCP (Model Context Protocol) server integration configuration.
        - `tools` MCPToolsListMemberString[], required — List of MCP tools can be used with the association.
      - `gitlab` object — GitLab project integration configuration.
        - `projectId` string, required — GitLab numeric project ID.
        - `projectPath` string, required — Full GitLab project path (e.g., namespace/project-name).
        - `instanceIdentifier` string — GitLab instance identifier (e.g., gitlab.com or e2e.gamma.dev.us-east-1.gitlab.falco.ai.aws.dev)
        - `runtimeRoleArn` string — Optional role ARN that AIDevOps assumes at runtime for automatic verification testing and VPC connectivity on this association.
      - `mcpserversplunk` object — Splunk MCP server integration configuration.
      - `eventChannel` object — Event Channel instance integration configuration.
      - `azure` object — Azure subscription integration configuration.
        - `subscriptionId` string, required — Azure subscription ID corresponding to provided resources.
      - `azuredevops` object — Azure DevOps project integration configuration.
        - `organizationName` string, required — Azure DevOps organization name.
        - `projectId` string, required — Azure DevOps project ID.
        - `projectName` string, required — Azure DevOps project name.
      - `mcpservergrafana` object — Grafana MCP server integration configuration.
        - `endpoint` string, required — Grafana instance URL (e.g., https://your-instance.grafana.net)
        - `organizationId` string — The Grafana organization ID that can be used.
        - `tools` MCPToolsListMemberString[] — List of MCP tools that can be used.
      - `pagerduty` object — PagerDuty integration configuration
        - `services` String[], required — List of Pagerduty service available for the association.
        - `customerEmail` string, password, required — Email to be used in Pagerduty API header
      - `mcpserversigv4` object — SigV4-authenticated MCP server integration configuration.
        - `tools` MCPToolsListMemberString[], required — List of MCP tools available for the association.
      - `remoteagent` object — Remote A2A agent integration configuration (token-based auth).
      - `remoteagentsigv4` object — Remote A2A agent integration configuration (SigV4 auth).
    - `capabilities` object — Enabled capabilities for this association.
  - `webhook` object — Generic webhook configuration
    - `webhookUrl` string — The webhook URL endpoint
    - `webhookId` string — The unique webhook identifier
    - `webhookType` 'hmac' | 'apikey' | 'gitlab' | 'pagerduty' — The webhook authentication type
    - `webhookSecret` string, password — The webhook secret for authentication
    - `apiKey` string, password — API Key for API Key webhook authentication

## Other responses

- `480` — ValidationException
- `481` — ContentSizeExceededException
- `482` — ServiceQuotaExceededException
- `483` — ConflictException
- `484` — InternalServerException
- `485` — AccessDeniedException
- `486` — InvalidParameterException
- `487` — ResourceNotFoundException
- `488` — ThrottlingException

---

[API](https://skmtc.net/aws/apis/devops-agent.md) · [All operations](https://skmtc.net/aws/apis/devops-agent/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/devops-agent/versions/ca2af02d3853/schema)
