setup-service-scanner
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSet Up a Scanner
设置扫描器
Overview
概述
Creates a complete scanner configuration that can discover and import services (such as AI agents, MCP servers, and API metadata) from external platforms into Anypoint Exchange. This involves selecting a target system, validating credentials, and configuring the scanner.
What you'll build: A fully configured scanner that can discover services from your chosen cloud platform (AWS Bedrock, Microsoft Copilot, Google Vertex AI, etc.)
创建完整的扫描器配置,用于从外部平台发现服务(如 AI Agent、MCP 服务器和 API 元数据)并将其导入 Anypoint Exchange。此过程包括选择目标系统、验证凭据和配置扫描器。
你将构建: 一个配置完备的扫描器,可从所选云平台(AWS Bedrock、Microsoft Copilot、Google Vertex AI 等)发现服务。
Prerequisites
前置条件
Before starting, ensure you have:
-
Anypoint Platform Access
- Valid Anypoint Platform account with appropriate permissions
- Organization ID for your Business Group
-
Cloud Platform Credentials
- Credentials for the external platform you want to scan (e.g., AWS access keys, Azure credentials, Google service account)
- Network access to the target platform's APIs
-
Permissions
- Permission to create scanner configurations in your organization
- Permission to store credentials securely
开始前,请确保您具备:
-
Anypoint Platform 访问权限
- 有效的 Anypoint Platform 账户及适当的权限
- Business Group 的 Organization ID
-
云平台凭据
- 要扫描的外部平台凭据(例如 AWS access keys、Azure 凭据、Google service account)
- 对目标平台 API 的网络访问权限
-
权限
- 在组织中创建扫描器配置的权限
- 安全存储凭据的权限
Step 1: Get Available Target Systems
第 1 步:获取可用的目标系统
First, retrieve the list of available target systems to see which platforms you can scan.
What you'll need:
- Your organization ID
Action: Call the Scanners Configuration API to list available target systems for your organization.
yaml
api: urn:api:agent-scanner-configuration-service
operationId: getTargetSystems
inputs:
organizationId:
from:
api: urn:api:access-management
operation: getOrganizations
field: $.id
name: currentOrganization
description: Your organization's Business Group GUID
outputs:
- name: targetSystemId
path: $[*].id
labels: $[*].name
description: The target system ID to use when creating a connection
- name: targetSystemType
path: $[*].type
description: The target system type (e.g., bedrock, mscopilot, vertex)What happens next: You receive a list of available target systems with their IDs, names, and supported authentication schemes. Choose the one matching your cloud platform.
Common issues:
- 401 Unauthorized: Verify your authorization token is valid
- Empty list: Your organization may not have access to certain target systems
首先,获取可用目标系统的列表,以查看可以扫描哪些平台。
你需要:
- 你的 Organization ID
操作: 调用 Scanners Configuration API,列出组织可用的目标系统。
yaml
api: urn:api:agent-scanner-configuration-service
operationId: getTargetSystems
inputs:
organizationId:
from:
api: urn:api:access-management
operation: getOrganizations
field: $.id
name: currentOrganization
description: Your organization's Business Group GUID
outputs:
- name: targetSystemId
path: $[*].id
labels: $[*].name
description: The target system ID to use when creating a connection
- name: targetSystemType
path: $[*].type
description: The target system type (e.g., bedrock, mscopilot, vertex)接下来会发生什么: 您将收到可用目标系统的列表,其中包含 ID、名称和支持的身份验证方案。请选择与您的云平台匹配的目标系统。
常见问题:
- 401 Unauthorized:确认您的授权令牌有效
- 列表为空:您的组织可能无权访问某些目标系统
Step 2: Validate Connection Credentials
第 2 步:验证连接凭据
Validate the credentials you plan to use for scanner configuration.
What you'll need:
- Target system type from Step 1
- Authentication credentials for the platform (varies by target system)
Action: Test connectivity with your platform credentials.
yaml
api: urn:api:agent-scanner-configuration-service
operationId: testConnection
inputs:
organizationId:
from:
variable: organizationId
description: Same organization ID as Step 1
targetSystemType:
from:
variable: targetSystemType
description: Target system type from Step 1 (for example, bedrock, mscopilot, vertex)
requestBody:
userProvided: true
description: |
Connection test parameters including:
- authScheme: Authentication scheme (e.g., "accessKey", "oauth2")
- authParameters: JSON with credentials (varies by platform)
example: |
{
"authScheme": "accessKey",
"authParameters": "{\"accessKeyId\":\"...\",\"secretAccessKey\":\"...\",\"region\":\"us-east-1\"}"
}
outputs: []What happens next: You confirm whether the credentials are valid before creating the scanner configuration.
Common issues:
- 400 Bad Request: Check that authParameters JSON is valid and contains required fields
- 424 Failed Dependency: Target platform rejected or could not validate the credentials
验证计划用于扫描器配置的凭据。
你需要:
- 第 1 步中的目标系统类型
- 平台的身份验证凭据(因目标系统而异)
操作: 使用您的平台凭据测试连接。
yaml
api: urn:api:agent-scanner-configuration-service
operationId: testConnection
inputs:
organizationId:
from:
variable: organizationId
description: Same organization ID as Step 1
targetSystemType:
from:
variable: targetSystemType
description: Target system type from Step 1 (for example, bedrock, mscopilot, vertex)
requestBody:
userProvided: true
description: |
Connection test parameters including:
- authScheme: Authentication scheme (e.g., "accessKey", "oauth2")
- authParameters: JSON with credentials (varies by platform)
example: |
{
"authScheme": "accessKey",
"authParameters": "{\"accessKeyId\":\"...\",\"secretAccessKey\":\"...\",\"region\":\"us-east-1\"}"
}
outputs: []接下来会发生什么: 您将在创建扫描器配置前确认凭据是否有效。
常见问题:
- 400 Bad Request:检查 authParameters JSON 是否有效,并包含必填字段
- 424 Failed Dependency:目标平台拒绝或无法验证凭据
Step 3: Create Scanner Configuration
第 3 步:创建扫描器配置
Create the scanner configuration that will use your connection to discover services.
What you'll need:
- Target system ID from Step 1
- Authentication details validated in Step 2
- A name and schedule for the scanner
Action: Create the scanner configuration.
yaml
api: urn:api:agent-scanner-configuration-service
operationId: createScanConfigurations
inputs:
organizationId:
from:
variable: organizationId
description: Same organization ID as previous steps
requestBody:
userProvided: true
description: |
Scanner configuration including:
- name: Display name for the scanner
- schedule: JSON schedule configuration
- runPolicy: JSON run policy (can be empty object)
- connection: Object with connection details
- notificationEnabled: Whether to send email notifications
example: |
{
"name": "My Bedrock Scanner",
"description": "Scans AWS Bedrock for services such as AI agents",
"schedule": "{\"frequency\":\"daily\",\"time\":\"02:00\"}",
"runPolicy": "{}",
"connection": {
"targetSystemId": "target-system-uuid-from-step-1",
"authScheme": "accessKey",
"authParameters": "{\"accessKeyId\":\"...\",\"secretAccessKey\":\"...\",\"region\":\"us-east-1\"}"
},
"notificationEnabled": false
}
outputs:
- name: scannerConfigurationId
path: $.id
description: The UUID of the created scanner configuration
- name: scannerState
path: $.state
description: The current state of the scanner (e.g., SCHEDULED, STOPPED)What happens next: The scanner configuration is created. Depending on the schedule, it will automatically run at the configured times, or you can trigger it manually.
创建扫描器配置,使用该连接发现服务。
你需要:
- 第 1 步中的目标系统 ID
- 第 2 步中已验证的身份验证信息
- 扫描器的名称和调度计划
操作: 创建扫描器配置。
yaml
api: urn:api:agent-scanner-configuration-service
operationId: createScanConfigurations
inputs:
organizationId:
from:
variable: organizationId
description: Same organization ID as previous steps
requestBody:
userProvided: true
description: |
Scanner configuration including:
- name: Display name for the scanner
- schedule: JSON schedule configuration
- runPolicy: JSON run policy (can be empty object)
- connection: Object with connection details
- notificationEnabled: Whether to send email notifications
example: |
{
"name": "My Bedrock Scanner",
"description": "Scans AWS Bedrock for services such as AI agents",
"schedule": "{\"frequency\":\"daily\",\"time\":\"02:00\"}",
"runPolicy": "{}",
"connection": {
"targetSystemId": "target-system-uuid-from-step-1",
"authScheme": "accessKey",
"authParameters": "{\"accessKeyId\":\"...\",\"secretAccessKey\":\"...\",\"region\":\"us-east-1\"}"
},
"notificationEnabled": false
}
outputs:
- name: scannerConfigurationId
path: $.id
description: The UUID of the created scanner configuration
- name: scannerState
path: $.state
description: The current state of the scanner (e.g., SCHEDULED, STOPPED)接下来会发生什么: 扫描器配置已创建。根据调度计划,它将在设定时间自动运行,您也可以手动触发。
Completion Checklist
完成检查清单
After completing all steps, verify:
- Target system was selected from available options
- Credentials were validated successfully
- Scanner configuration was created successfully
- Scanner state shows as SCHEDULED or STOPPED (ready to run)
完成所有步骤后,请验证:
- 已从可用选项中选择目标系统
- 已成功验证凭据
- 已成功创建扫描器配置
- 扫描器状态显示为 SCHEDULED 或 STOPPED(已准备好运行)
What You've Built
您构建的成果
Your scanner configuration now has:
Connection to External Platform
- Secure credential storage
- Connection to your chosen cloud platform
Configured Scanner
- Named scanner configuration
- Scheduled or manual execution
- Ready to discover services such as AI agents, MCP servers, and API metadata
您的扫描器配置现在包含:
与外部平台的连接
- 安全存储凭据
- 连接到所选云平台
已配置的扫描器
- 带有名称的扫描器配置
- 定时或手动执行
- 已准备好发现服务,如 AI Agent、MCP 服务器和 API 元数据
Next Steps
后续步骤
Now that your scanner is configured:
-
Run the scanner manually
- Use the "Run Scan and View Results" skill to execute immediately
-
Monitor scheduled runs
- Check the scanner run history for automated executions
-
Review discovered services
- View staging assets to see discovered services before publication
完成扫描器配置后:
-
手动运行扫描器
- 使用 "Run Scan and View Results" skill 立即执行
-
监控定时运行
- 查看扫描器运行历史记录,了解自动执行情况
-
审查已发现的服务
- 在发布前查看 staging assets,以检查已发现的服务
Tips and Best Practices
提示与最佳实践
Security
安全
- Rotate credentials regularly: Update connection credentials periodically
- Use least-privilege access: Only grant the minimum permissions needed for scanning
- 定期轮换凭据:定期更新连接凭据
- 使用最小权限访问:仅授予扫描所需的最低权限
Scheduling
调度
- Off-peak hours: Schedule scans during low-traffic periods
- Frequency: Daily scans are typically sufficient for most use cases
- 低峰时段:将扫描安排在流量较低的时段
- 频率:对于大多数使用场景,每日扫描通常已经足够
Troubleshooting
故障排除
Connection Validation Fails
连接验证失败
Symptoms: Credential validation request fails or returns a dependency error
Possible causes:
- Invalid credentials
- Network connectivity issues
- Insufficient permissions on the target platform
Solutions:
- Verify credentials are correct and not expired
- Check network/firewall rules allow access to the platform APIs
- Ensure the credentials have read access to list services
症状: 凭据验证请求失败或返回依赖错误
可能原因:
- 凭据无效
- 网络连接问题
- 目标平台上的权限不足
解决方案:
- 确认凭据正确且未过期
- 检查网络或防火墙规则是否允许访问平台 API
- 确保凭据具有列出服务的读取权限
Scanner Configuration Creation Fails
扫描器配置创建失败
Symptoms: 400 Bad Request when creating scanner configuration
Possible causes:
- Invalid schedule JSON format
- Missing required fields
- Invalid connection/auth payload structure
Solutions:
- Validate schedule JSON syntax
- Ensure all required fields (name, schedule, runPolicy) are provided
- Verify the connection payload fields and credential format
症状: 创建扫描器配置时返回 400 Bad Request
可能原因:
- 调度 JSON 格式无效
- 缺少必填字段
- 连接或身份验证数据结构无效
解决方案:
- 验证调度 JSON 的语法
- 确保已提供所有必填字段(name、schedule、runPolicy)
- 验证连接数据字段和凭据格式
Related Jobs
相关任务
- run-service-scan-and-view-results: Execute a scan and view discovered services
- run-service-scan-and-view-results:执行扫描并查看已发现的服务