Microsoft Azure API Management · Arazzo Workflow

Azure API Management Configure Product Policy

Version 1.0.0

Confirm a product exists, set its policy document, then read the policy back.

1 workflow 1 source API 1 provider
View Spec View on GitHub A2AAI GatewayAPI CenterAPI GatewayAPI ManagementEnterpriseMCPMicrosoft AzureArazzoWorkflows

Provider

microsoft-azure-api-management

Workflows

configure-product-policy
Set a product-scoped policy and confirm it.
Confirms the product exists, writes the product policy document, then reads it back to verify it was stored.
3 steps inputs: policyContent, policyFormat, policyId, productId, resourceGroupName, serviceName, subscriptionId outputs: policyResourceId
1
getProduct
Product_Get
Read the product to confirm it exists before applying a policy to it.
2
setPolicy
ProductPolicy_CreateOrUpdate
Create or update the product-scoped policy with the supplied document.
3
confirmPolicy
ProductPolicy_Get
Read the policy back to confirm the document was stored on the product.

Source API Descriptions

Arazzo Workflow Specification

microsoft-azure-api-management-configure-product-policy-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Azure API Management Configure Product Policy
  summary: Confirm a product exists, set its policy document, then read the policy back.
  description: >-
    Applies a product-scoped policy such as a rate limit or quota that governs
    every API in the product. The workflow reads the product to confirm it
    exists, creates or updates the product policy with the supplied document,
    then reads the policy back to confirm it was stored. Every step spells out
    its request inline so the flow can be read and executed without opening the
    underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: azureApiManagementApi
  url: ../openapi/microsoft-azure-api-management-rest-api-openapi.yaml
  type: openapi
workflows:
- workflowId: configure-product-policy
  summary: Set a product-scoped policy and confirm it.
  description: >-
    Confirms the product exists, writes the product policy document, then reads
    it back to verify it was stored.
  inputs:
    type: object
    required:
    - subscriptionId
    - resourceGroupName
    - serviceName
    - productId
    - policyId
    - policyContent
    properties:
      subscriptionId:
        type: string
        description: The Azure subscription identifier.
      resourceGroupName:
        type: string
        description: The resource group containing the service.
      serviceName:
        type: string
        description: The API Management service name.
      productId:
        type: string
        description: The product identifier to apply the policy to.
      policyId:
        type: string
        description: The policy identifier (typically "policy").
      policyContent:
        type: string
        description: The policy document content.
      policyFormat:
        type: string
        description: The policy content format (e.g. xml or rawxml).
  steps:
  - stepId: getProduct
    description: >-
      Read the product to confirm it exists before applying a policy to it.
    operationId: Product_Get
    parameters:
    - name: subscriptionId
      in: path
      value: $inputs.subscriptionId
    - name: resourceGroupName
      in: path
      value: $inputs.resourceGroupName
    - name: serviceName
      in: path
      value: $inputs.serviceName
    - name: productId
      in: path
      value: $inputs.productId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      productResourceId: $response.body#/id
  - stepId: setPolicy
    description: >-
      Create or update the product-scoped policy with the supplied document.
    operationId: ProductPolicy_CreateOrUpdate
    parameters:
    - name: subscriptionId
      in: path
      value: $inputs.subscriptionId
    - name: resourceGroupName
      in: path
      value: $inputs.resourceGroupName
    - name: serviceName
      in: path
      value: $inputs.serviceName
    - name: productId
      in: path
      value: $inputs.productId
    - name: policyId
      in: path
      value: $inputs.policyId
    requestBody:
      contentType: application/json
      payload:
        properties:
          value: $inputs.policyContent
          format: $inputs.policyFormat
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      policyResourceId: $response.body#/id
  - stepId: confirmPolicy
    description: >-
      Read the policy back to confirm the document was stored on the product.
    operationId: ProductPolicy_Get
    parameters:
    - name: subscriptionId
      in: path
      value: $inputs.subscriptionId
    - name: resourceGroupName
      in: path
      value: $inputs.resourceGroupName
    - name: serviceName
      in: path
      value: $inputs.serviceName
    - name: productId
      in: path
      value: $inputs.productId
    - name: policyId
      in: path
      value: $inputs.policyId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      policyResourceId: $response.body#/id
  outputs:
    policyResourceId: $steps.setPolicy.outputs.policyResourceId