azure-static-web-apps
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAzure Static Web Apps Skill
Azure Static Web Apps Skill
This skill provides expert guidance for Azure Static Web Apps. Covers troubleshooting, decision making, limits & quotas, security, configuration, integrations & coding patterns, and deployment. It combines local quick-reference content with remote documentation fetching capabilities.
本Skill为Azure Static Web Apps提供专业指导,涵盖故障排查、决策制定、限制与配额、安全、配置、集成与编码模式以及部署。它结合了本地速查内容与远程文档获取能力。
How to Use This Skill
如何使用本Skill
IMPORTANT for Agent: Use the Category Index below to locate relevant sections. For categories with line ranges (e.g.,), useL35-L120with the specified lines. For categories with file links (e.g.,read_file), use[security.md](security.md)on the linked reference fileread_file
IMPORTANT for Agent: Ifis more than 3 months old, suggest the user pull the latest version from the repository. Ifmetadata.generated_attools are not available, suggest the user install it: Installation Guidemcp_microsoftdocs
This skill requires network access to fetch documentation content:
- Preferred: Use with query string
mcp_microsoftdocs:microsoft_docs_fetch. Returns Markdown.from=learn-agent-skill - Fallback: Use with query string
fetch_webpage. Returns Markdown.from=learn-agent-skill&accept=text/markdown
Agent 注意事项:使用下方的分类索引查找相关章节。对于带有行范围的分类(例如),请使用L35-L120工具读取指定行内容。对于带有文件链接的分类(例如read_file),请使用[security.md](security.md)工具读取链接的参考文件read_file
本Skill需要网络访问权限来获取文档内容:
- 推荐方式:使用工具,并携带查询字符串
mcp_microsoftdocs:microsoft_docs_fetch,返回Markdown格式内容。from=learn-agent-skill - 备用方式:使用工具,并携带查询字符串
fetch_webpage,返回Markdown格式内容。from=learn-agent-skill&accept=text/markdown
Category Index
分类索引
| Category | Lines | Description |
|---|---|---|
| Troubleshooting | L35-L39 | Diagnosing and fixing common Static Web Apps deployment and runtime issues, including build failures, configuration problems, and troubleshooting tools/logs. |
| Decision Making | L40-L47 | Guidance on key architecture choices: Functions hosting model, using Front Door/CDN edge, Next.js deployment options, and comparing Free vs Standard Static Web Apps plans. |
| Limits & Quotas | L48-L53 | Runtime versions and language support for Static Web Apps, plus plan-specific quotas and limits (storage, bandwidth, functions, concurrency, and resource caps). |
| Security | L54-L65 | Configuring auth, roles, secrets, and access: Entra ID/Graph roles, auth providers, user info, deployment tokens, Key Vault/managed identity, password protection, and private endpoints. |
| Configuration | L66-L92 | Configuring domains, DNS, backends (Functions, App Service, Container Apps, APIM), build/runtime settings, local emulation (SWA CLI), monitoring, and database/network for Static Web Apps. |
| Integrations & Coding Patterns | L93-L101 | How to connect Static Web Apps APIs to Azure databases (Cosmos DB, SQL, MySQL, PostgreSQL), including Mongoose usage, connection strings, and typical integration patterns. |
| Deployment | L102-L118 | Deploying Static Web Apps via GitHub/GitLab/Bitbucket/CLI/ARM/Bicep, configuring CI/CD, preview environments, traffic splitting, and optional Azure Front Door CDN setup |
| 分类 | 行号 | 说明 |
|---|---|---|
| 故障排查 | L35-L39 | 诊断并修复Static Web Apps常见的部署和运行时问题,包括构建失败、配置问题以及故障排查工具/日志。 |
| 决策制定 | L40-L47 | 关键架构选择指导:Functions托管模型、Front Door/CDN边缘节点使用、Next.js部署选项,以及Free与Standard Static Web Apps方案对比。 |
| 限制与配额 | L48-L53 | Static Web Apps支持的运行时版本和语言,以及各方案的特定配额与限制(存储、带宽、Functions、并发数和资源上限)。 |
| 安全配置 | L54-L65 | 配置身份验证、角色、密钥与访问权限:Entra ID/Graph角色、身份验证提供商、用户信息、部署令牌、Key Vault/托管标识、密码保护和专用端点。 |
| 服务配置 | L66-L92 | 配置域名、DNS、后端服务(Functions、App Service、Container Apps、APIM)、构建/运行时设置、本地模拟(SWA CLI)、监控以及Static Web Apps的数据库/网络。 |
| 集成与编码模式 | L93-L101 | 如何将Static Web Apps API连接到Azure数据库(Cosmos DB、SQL、MySQL、PostgreSQL),包括Mongoose使用、连接字符串和典型集成模式。 |
| 部署管理 | L102-L118 | 通过GitHub/GitLab/Bitbucket/CLI/ARM/Bicep部署Static Web Apps,配置CI/CD、预览环境、流量拆分,以及可选的Azure Front Door CDN设置 |
Troubleshooting
故障排查
| Topic | URL |
|---|---|
| Troubleshoot common deployment and runtime issues in Azure Static Web Apps | https://learn.microsoft.com/en-us/azure/static-web-apps/troubleshooting |
| 主题 | 链接 |
|---|---|
| 排查Azure Static Web Apps中常见的部署和运行时问题 | https://learn.microsoft.com/en-us/azure/static-web-apps/troubleshooting |
Decision Making
决策制定
| Topic | URL |
|---|---|
| Choose managed vs bring-your-own Azure Functions for Static Web Apps | https://learn.microsoft.com/en-us/azure/static-web-apps/apis-functions |
| Use enterprise-grade edge for Azure Static Web Apps with Azure Front Door and CDN | https://learn.microsoft.com/en-us/azure/static-web-apps/enterprise-edge |
| Select Next.js deployment model on Static Web Apps | https://learn.microsoft.com/en-us/azure/static-web-apps/nextjs |
| Choose Azure Static Web Apps Free vs Standard plans | https://learn.microsoft.com/en-us/azure/static-web-apps/plans |
| 主题 | 链接 |
|---|---|
| 为Static Web Apps选择托管式或自定义Azure Functions | https://learn.microsoft.com/en-us/azure/static-web-apps/apis-functions |
| 通过Azure Front Door和CDN为Azure Static Web Apps启用企业级边缘节点 | https://learn.microsoft.com/en-us/azure/static-web-apps/enterprise-edge |
| 在Static Web Apps上选择Next.js部署模型 | https://learn.microsoft.com/en-us/azure/static-web-apps/nextjs |
| 选择Azure Static Web Apps Free与Standard方案 | https://learn.microsoft.com/en-us/azure/static-web-apps/plans |
Limits & Quotas
限制与配额
| Topic | URL |
|---|---|
| Supported languages and runtime versions for Azure Static Web Apps | https://learn.microsoft.com/en-us/azure/static-web-apps/languages-runtimes |
| Quotas and limits for Azure Static Web Apps plans | https://learn.microsoft.com/en-us/azure/static-web-apps/quotas |
| 主题 | 链接 |
|---|---|
| Azure Static Web Apps支持的语言和运行时版本 | https://learn.microsoft.com/en-us/azure/static-web-apps/languages-runtimes |
| Azure Static Web Apps各方案的配额与限制 | https://learn.microsoft.com/en-us/azure/static-web-apps/quotas |
Security
安全配置
| 主题 | 链接 |
|---|---|
| 使用Microsoft Graph和Entra ID分配Static Web Apps角色 | https://learn.microsoft.com/en-us/azure/static-web-apps/assign-roles-microsoft-graph |
| 为Azure Static Web Apps配置身份验证与授权 | https://learn.microsoft.com/en-us/azure/static-web-apps/authentication-authorization |
| 为Azure Static Web Apps配置自定义身份验证提供商 | https://learn.microsoft.com/en-us/azure/static-web-apps/authentication-custom |
| 管理和重置Azure Static Web Apps的部署令牌 | https://learn.microsoft.com/en-us/azure/static-web-apps/deployment-token-management |
| 使用Key Vault和托管标识存储Static Web Apps身份验证密钥 | https://learn.microsoft.com/en-us/azure/static-web-apps/key-vault-secrets |
| 为Azure Static Web Apps环境启用密码保护 | https://learn.microsoft.com/en-us/azure/static-web-apps/password-protection |
| 为Azure Static Web Apps配置专用端点访问 | https://learn.microsoft.com/en-us/azure/static-web-apps/private-endpoint |
| 在Azure Static Web Apps中访问已认证用户信息 | https://learn.microsoft.com/en-us/azure/static-web-apps/user-information |
Configuration
服务配置
Integrations & Coding Patterns
集成与编码模式
| Topic | URL |
|---|---|
| Use Mongoose with Azure Cosmos DB in Static Web Apps | https://learn.microsoft.com/en-us/azure/static-web-apps/add-mongoose |
| Connect Azure Static Web Apps to Azure Cosmos DB | https://learn.microsoft.com/en-us/azure/static-web-apps/database-azure-cosmos-db |
| Connect Azure Static Web Apps to Azure SQL Database | https://learn.microsoft.com/en-us/azure/static-web-apps/database-azure-sql |
| Connect Azure Static Web Apps to Azure Database for MySQL | https://learn.microsoft.com/en-us/azure/static-web-apps/database-mysql |
| Connect Azure Static Web Apps to Azure Database for PostgreSQL | https://learn.microsoft.com/en-us/azure/static-web-apps/database-postgresql |
| 主题 | 链接 |
|---|---|
| 在Static Web Apps中使用Mongoose与Azure Cosmos DB | https://learn.microsoft.com/en-us/azure/static-web-apps/add-mongoose |
| 将Azure Static Web Apps连接到Azure Cosmos DB | https://learn.microsoft.com/en-us/azure/static-web-apps/database-azure-cosmos-db |
| 将Azure Static Web Apps连接到Azure SQL数据库 | https://learn.microsoft.com/en-us/azure/static-web-apps/database-azure-sql |
| 将Azure Static Web Apps连接到Azure Database for MySQL | https://learn.microsoft.com/en-us/azure/static-web-apps/database-mysql |
| 将Azure Static Web Apps连接到Azure Database for PostgreSQL | https://learn.microsoft.com/en-us/azure/static-web-apps/database-postgresql |