Примечание
Для доступа к этой странице требуется авторизация. Вы можете попробовать войти или изменить каталоги.
Для доступа к этой странице требуется авторизация. Вы можете попробовать изменить каталоги.
Microsoft Copilot in Azure can author Azure API Management policies based on your requirements. By using Microsoft Copilot in Azure, you can create policies quickly, even if you're not sure what code you need. This can be especially helpful when creating complex policies with many requirements.
To get help authoring API Management policies, start from the Design tab of an API you previously imported to your API Management instance. Be sure to use the code editor view. Ask Microsoft Copilot in Azure to generate policy definitions for you, then copy the results right into the editor, making any desired changes. You can also ask questions to understand the different options or change the provided policy.
When you're working with API Management policies, you can also select a portion of the policy, right-click, and then select Explain. This will open Microsoft Copilot in Azure and paste your selection with a prompt to explain how that part of the policy works.
Подсказка
Задачи и примеры запросов, перечисленные здесь, показывают несколько областей, в которых Microsoft Copilot в Azure может быть особенно полезным. Однако это не полный список всех действий, которые вы можете сделать. Мы рекомендуем вам поэкспериментировать с собственными запросами и узнать, как Microsoft Copilot в Azure поможет вам управлять ресурсами и средой Azure.
Sample prompts
Here are a few examples of the kinds of prompts you can use to get help authoring API Management policies. Modify these prompts based on your real-life scenarios, or try additional prompts to create different kinds of policies.
- "Generate a policy to configure rate limiting with 5 requests per second"
- "Generate a policy to remove a 'X-AspNet-Version' header from the response"
- "Explain (selected policy or element) to me"
Examples
When creating an API Management policy, you can say "Can you show me how to write a policy expression to filter API responses based on user roles in Azure API Management?" Copilot in Azure generates a policy and explains how it works.
For another example, you can say "Generate a policy to configure rate limiting with 5 requests per second." Again, Copilot in Azure provides an example policy that you can use or modify.
When you have questions about policy elements, you can get more information by selecting a section of the policy, right-clicking, and selecting Explain.
Microsoft Copilot in Azure explains how the code works, breaking down each specific section and providing links to learn more.
Next steps
- Explore capabilities of Microsoft Copilot in Azure.
- Learn more about Azure API Management.