Microsoft.ApiManagement service/apis/operations

The service/apis/operations resource type can be deployed to: Resource groups.

To learn about resource group deployments, see Bicep or ARM template.

Template format

To create a Microsoft.ApiManagement/service/apis/operations resource, add the following Bicep or JSON to your template.

resource symbolicname 'Microsoft.ApiManagement/service/apis/operations@2021-01-01-preview' = {
  name: 'string'
  properties: {
    description: 'string'
    displayName: 'string'
    method: 'string'
    policies: 'string'
    request: {
      description: 'string'
      headers: [
        {
          defaultValue: 'string'
          description: 'string'
          name: 'string'
          required: bool
          schemaId: 'string'
          type: 'string'
          typeName: 'string'
          values: [ 'string' ]
        }
      ]
      queryParameters: [
        {
          defaultValue: 'string'
          description: 'string'
          name: 'string'
          required: bool
          schemaId: 'string'
          type: 'string'
          typeName: 'string'
          values: [ 'string' ]
        }
      ]
      representations: [
        {
          contentType: 'string'
          formParameters: [
            {
              defaultValue: 'string'
              description: 'string'
              name: 'string'
              required: bool
              schemaId: 'string'
              type: 'string'
              typeName: 'string'
              values: [ 'string' ]
            }
          ]
          sample: 'string'
          schemaId: 'string'
          typeName: 'string'
        }
      ]
    }
    responses: [
      {
        description: 'string'
        headers: [
          {
            defaultValue: 'string'
            description: 'string'
            name: 'string'
            required: bool
            schemaId: 'string'
            type: 'string'
            typeName: 'string'
            values: [ 'string' ]
          }
        ]
        representations: [
          {
            contentType: 'string'
            formParameters: [
              {
                defaultValue: 'string'
                description: 'string'
                name: 'string'
                required: bool
                schemaId: 'string'
                type: 'string'
                typeName: 'string'
                values: [ 'string' ]
              }
            ]
            sample: 'string'
            schemaId: 'string'
            typeName: 'string'
          }
        ]
        statusCode: int
      }
    ]
    templateParameters: [
      {
        defaultValue: 'string'
        description: 'string'
        name: 'string'
        required: bool
        schemaId: 'string'
        type: 'string'
        typeName: 'string'
        values: [ 'string' ]
      }
    ]
    urlTemplate: 'string'
  }
}

Property values

service/apis/operations

Name Description Value
type The resource type

For Bicep, set this value in the resource declaration.
'Microsoft.ApiManagement/service/apis/operations'
apiVersion The resource api version

For Bicep, set this value in the resource declaration.
'2021-01-01-preview'
name The resource name

See how to set names and types for child resources in Bicep or JSON ARM templates.
string (required)
properties Operation Contract Properties OperationContractProperties

OperationContractProperties

Name Description Value
description Description of the operation. May include HTML formatting tags. string
displayName Operation Name. string (required)
method A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them. string (required)
policies Operation Policies string
request Operation request details. RequestContract
responses Array of Operation responses. ResponseContract[]
templateParameters Collection of URL template parameters. ParameterContract[]
urlTemplate Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date} string (required)

RequestContract

Name Description Value
description Operation request description. string
headers Collection of operation request headers. ParameterContract[]
queryParameters Collection of operation request query parameters. ParameterContract[]
representations Collection of operation request representations. RepresentationContract[]

ParameterContract

Name Description Value
defaultValue Default parameter value. string
description Parameter description. string
name Parameter name. string (required)
required Specifies whether parameter is required or not. bool
schemaId Schema identifier. string
type Parameter type. string (required)
typeName Type name defined by the schema. string
values Parameter values. string[]

RepresentationContract

Name Description Value
contentType Specifies a registered or custom content type for this representation, e.g. application/xml. string (required)
formParameters Collection of form parameters. Required if 'contentType' value is either 'application/x-www-form-urlencoded' or 'multipart/form-data'.. ParameterContract[]
sample An example of the representation. string
schemaId Schema identifier. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'. string
typeName Type name defined by the schema. Applicable only if 'contentType' value is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data'. string

ResponseContract

Name Description Value
description Operation response description. string
headers Collection of operation response headers. ParameterContract[]
representations Collection of operation response representations. RepresentationContract[]
statusCode Operation response HTTP status code. int (required)