Microsoft.ApiManagement service/apis/operations 2022-08-01

Bicep 資源定義

您可以使用目標作業來部署服務/apis/operations 資源類型:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔

資源格式

若要建立 Microsoft.ApiManagement/service/apis/operations 資源,請將下列 Bicep 新增至範本。

resource symbolicname 'Microsoft.ApiManagement/service/apis/operations@2022-08-01' = {
  name: 'string'
  parent: resourceSymbolicName
  properties: {
    description: 'string'
    displayName: 'string'
    method: 'string'
    policies: 'string'
    request: {
      description: 'string'
      headers: [
        {
          defaultValue: 'string'
          description: 'string'
          examples: {
            {customized property}: {
              description: 'string'
              externalValue: 'string'
              summary: 'string'
              value: any()
            }
          }
          name: 'string'
          required: bool
          schemaId: 'string'
          type: 'string'
          typeName: 'string'
          values: [
            'string'
          ]
        }
      ]
      queryParameters: [
        {
          defaultValue: 'string'
          description: 'string'
          examples: {
            {customized property}: {
              description: 'string'
              externalValue: 'string'
              summary: 'string'
              value: any()
            }
          }
          name: 'string'
          required: bool
          schemaId: 'string'
          type: 'string'
          typeName: 'string'
          values: [
            'string'
          ]
        }
      ]
      representations: [
        {
          contentType: 'string'
          examples: {
            {customized property}: {
              description: 'string'
              externalValue: 'string'
              summary: 'string'
              value: any()
            }
          }
          formParameters: [
            {
              defaultValue: 'string'
              description: 'string'
              examples: {
                {customized property}: {
                  description: 'string'
                  externalValue: 'string'
                  summary: 'string'
                  value: any()
                }
              }
              name: 'string'
              required: bool
              schemaId: 'string'
              type: 'string'
              typeName: 'string'
              values: [
                'string'
              ]
            }
          ]
          schemaId: 'string'
          typeName: 'string'
        }
      ]
    }
    responses: [
      {
        description: 'string'
        headers: [
          {
            defaultValue: 'string'
            description: 'string'
            examples: {
              {customized property}: {
                description: 'string'
                externalValue: 'string'
                summary: 'string'
                value: any()
              }
            }
            name: 'string'
            required: bool
            schemaId: 'string'
            type: 'string'
            typeName: 'string'
            values: [
              'string'
            ]
          }
        ]
        representations: [
          {
            contentType: 'string'
            examples: {
              {customized property}: {
                description: 'string'
                externalValue: 'string'
                summary: 'string'
                value: any()
              }
            }
            formParameters: [
              {
                defaultValue: 'string'
                description: 'string'
                examples: {
                  {customized property}: {
                    description: 'string'
                    externalValue: 'string'
                    summary: 'string'
                    value: any()
                  }
                }
                name: 'string'
                required: bool
                schemaId: 'string'
                type: 'string'
                typeName: 'string'
                values: [
                  'string'
                ]
              }
            ]
            schemaId: 'string'
            typeName: 'string'
          }
        ]
        statusCode: int
      }
    ]
    templateParameters: [
      {
        defaultValue: 'string'
        description: 'string'
        examples: {
          {customized property}: {
            description: 'string'
            externalValue: 'string'
            summary: 'string'
            value: any()
          }
        }
        name: 'string'
        required: bool
        schemaId: 'string'
        type: 'string'
        typeName: 'string'
        values: [
          'string'
        ]
      }
    ]
    urlTemplate: 'string'
  }
}

屬性值

service/apis/operations

名字 描述 價值
名字 資源名稱

請參閱如何在 Bicep 中設定子資源的名稱和類型。
字串 (必要)

字元限制:1-80

合法字元:
英數位元和連字元。

以字母開頭,並以英數位元結尾。
父母 在 Bicep 中,您可以指定子資源的父資源。 只有在父資源外部宣告子資源時,才需要新增這個屬性。

如需詳細資訊,請參閱 父資源外部的子資源
類型資源的符號名稱:apis
性能 作業合約的屬性。 OperationContractProperties

OperationContractProperties

名字 描述 價值
描述 作業的描述。 可能包含 HTML 格式標記。 字串

約束:
最大長度 = 1000
displayName 作業名稱。 字串 (必要)

約束:
最小長度 = 1
最大長度 = 300
方法 有效的 HTTP 作業方法。 一般 Http 方法,例如 GET、PUT、POST,但不受限制。 字串 (必要)
政策 作業原則 字串
請求 包含要求詳細數據的實體。 RequestContract
反應 作業回應的陣列。 ResponseContract[]
templateParameters URL 樣本參數的集合。 ParameterContract[]
urlTemplate 識別此作業之目標資源的相對URL範本。 可能包含參數。 範例:/customers/{cid}/orders/{oid}/?date={date} 字串 (必要)

約束:
最小長度 = 1
最大長度 = 1000

RequestContract

名字 描述 價值
描述 作業要求描述。 字串
作業要求標頭的集合。 ParameterContract[]
queryParameters 作業要求查詢參數的集合。 ParameterContract[]
交涉 作業要求表示法的集合。 RepresentationContract[]

ParameterContract

名字 描述 價值
defaultValue 預設參數值。 字串
描述 參數描述。 字串
例子 針對參數定義的範例。 ParameterExamplesContract
名字 參數名稱。 字串 (必要)
必填 指定參數是否為必要。 bool
schemaId 架構標識碼。 字串
類型 參數類型。 字串 (必要)
typeName 架構所定義的類型名稱。 字串
參數值。 string[]

ParameterExamplesContract

名字 描述 價值
{自定義屬性} ParameterExampleContract

ParameterExampleContract

名字 描述 價值
描述 範例的長描述 字串
externalValue 指向常值範例的 URL 字串
總結 範例的簡短描述 字串
價值 範例值。 可以是基本值或物件。 針對 Bicep,您可以使用 any() 函式。

RepresentationContract

名字 描述 價值
contentType 指定這個表示法的已註冊或自定義內容類型,例如 application/xml。 字串 (必要)
例子 針對表示法定義的範例。 ParameterExamplesContract
formParameters 表單參數的集合。 如果 'contentType' 值為 'application/x-www-form-urlencoded' 或 'multipart/form-data',則為必要專案。 ParameterContract[]
schemaId 架構標識碼。 只有在 'contentType' 值不是 'application/x-www-form-urlencoded' 或 'multipart/form-data' 時才適用。 字串
typeName 架構所定義的類型名稱。 只有在 'contentType' 值不是 'application/x-www-form-urlencoded' 或 'multipart/form-data' 時才適用。 字串

ResponseContract

名字 描述 價值
描述 作業回應描述。 字串
作業回應標頭的集合。 ParameterContract[]
交涉 作業回應表示的集合。 RepresentationContract[]
statusCode 作業回應 HTTP 狀態代碼。 int (必要)

ARM 樣本資源定義

您可以使用目標作業來部署服務/apis/operations 資源類型:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔

資源格式

若要建立 Microsoft.ApiManagement/service/apis/operations 資源,請將下列 JSON 新增至範本。

{
  "type": "Microsoft.ApiManagement/service/apis/operations",
  "apiVersion": "2022-08-01",
  "name": "string",
  "properties": {
    "description": "string",
    "displayName": "string",
    "method": "string",
    "policies": "string",
    "request": {
      "description": "string",
      "headers": [
        {
          "defaultValue": "string",
          "description": "string",
          "examples": {
            "{customized property}": {
              "description": "string",
              "externalValue": "string",
              "summary": "string",
              "value": {}
            }
          },
          "name": "string",
          "required": "bool",
          "schemaId": "string",
          "type": "string",
          "typeName": "string",
          "values": [ "string" ]
        }
      ],
      "queryParameters": [
        {
          "defaultValue": "string",
          "description": "string",
          "examples": {
            "{customized property}": {
              "description": "string",
              "externalValue": "string",
              "summary": "string",
              "value": {}
            }
          },
          "name": "string",
          "required": "bool",
          "schemaId": "string",
          "type": "string",
          "typeName": "string",
          "values": [ "string" ]
        }
      ],
      "representations": [
        {
          "contentType": "string",
          "examples": {
            "{customized property}": {
              "description": "string",
              "externalValue": "string",
              "summary": "string",
              "value": {}
            }
          },
          "formParameters": [
            {
              "defaultValue": "string",
              "description": "string",
              "examples": {
                "{customized property}": {
                  "description": "string",
                  "externalValue": "string",
                  "summary": "string",
                  "value": {}
                }
              },
              "name": "string",
              "required": "bool",
              "schemaId": "string",
              "type": "string",
              "typeName": "string",
              "values": [ "string" ]
            }
          ],
          "schemaId": "string",
          "typeName": "string"
        }
      ]
    },
    "responses": [
      {
        "description": "string",
        "headers": [
          {
            "defaultValue": "string",
            "description": "string",
            "examples": {
              "{customized property}": {
                "description": "string",
                "externalValue": "string",
                "summary": "string",
                "value": {}
              }
            },
            "name": "string",
            "required": "bool",
            "schemaId": "string",
            "type": "string",
            "typeName": "string",
            "values": [ "string" ]
          }
        ],
        "representations": [
          {
            "contentType": "string",
            "examples": {
              "{customized property}": {
                "description": "string",
                "externalValue": "string",
                "summary": "string",
                "value": {}
              }
            },
            "formParameters": [
              {
                "defaultValue": "string",
                "description": "string",
                "examples": {
                  "{customized property}": {
                    "description": "string",
                    "externalValue": "string",
                    "summary": "string",
                    "value": {}
                  }
                },
                "name": "string",
                "required": "bool",
                "schemaId": "string",
                "type": "string",
                "typeName": "string",
                "values": [ "string" ]
              }
            ],
            "schemaId": "string",
            "typeName": "string"
          }
        ],
        "statusCode": "int"
      }
    ],
    "templateParameters": [
      {
        "defaultValue": "string",
        "description": "string",
        "examples": {
          "{customized property}": {
            "description": "string",
            "externalValue": "string",
            "summary": "string",
            "value": {}
          }
        },
        "name": "string",
        "required": "bool",
        "schemaId": "string",
        "type": "string",
        "typeName": "string",
        "values": [ "string" ]
      }
    ],
    "urlTemplate": "string"
  }
}

屬性值

service/apis/operations

名字 描述 價值
類型 資源類型 'Microsoft.ApiManagement/service/apis/operations'
apiVersion 資源 API 版本 '2022-08-01'
名字 資源名稱

請參閱如何在JSON ARM 範本中設定子資源的名稱和類型。
字串 (必要)

字元限制:1-80

合法字元:
英數位元和連字元。

以字母開頭,並以英數位元結尾。
性能 作業合約的屬性。 OperationContractProperties

OperationContractProperties

名字 描述 價值
描述 作業的描述。 可能包含 HTML 格式標記。 字串

約束:
最大長度 = 1000
displayName 作業名稱。 字串 (必要)

約束:
最小長度 = 1
最大長度 = 300
方法 有效的 HTTP 作業方法。 一般 Http 方法,例如 GET、PUT、POST,但不受限制。 字串 (必要)
政策 作業原則 字串
請求 包含要求詳細數據的實體。 RequestContract
反應 作業回應的陣列。 ResponseContract[]
templateParameters URL 樣本參數的集合。 ParameterContract[]
urlTemplate 識別此作業之目標資源的相對URL範本。 可能包含參數。 範例:/customers/{cid}/orders/{oid}/?date={date} 字串 (必要)

約束:
最小長度 = 1
最大長度 = 1000

RequestContract

名字 描述 價值
描述 作業要求描述。 字串
作業要求標頭的集合。 ParameterContract[]
queryParameters 作業要求查詢參數的集合。 ParameterContract[]
交涉 作業要求表示法的集合。 RepresentationContract[]

ParameterContract

名字 描述 價值
defaultValue 預設參數值。 字串
描述 參數描述。 字串
例子 針對參數定義的範例。 ParameterExamplesContract
名字 參數名稱。 字串 (必要)
必填 指定參數是否為必要。 bool
schemaId 架構標識碼。 字串
類型 參數類型。 字串 (必要)
typeName 架構所定義的類型名稱。 字串
參數值。 string[]

ParameterExamplesContract

名字 描述 價值
{自定義屬性} ParameterExampleContract

ParameterExampleContract

名字 描述 價值
描述 範例的長描述 字串
externalValue 指向常值範例的 URL 字串
總結 範例的簡短描述 字串
價值 範例值。 可以是基本值或物件。

RepresentationContract

名字 描述 價值
contentType 指定這個表示法的已註冊或自定義內容類型,例如 application/xml。 字串 (必要)
例子 針對表示法定義的範例。 ParameterExamplesContract
formParameters 表單參數的集合。 如果 'contentType' 值為 'application/x-www-form-urlencoded' 或 'multipart/form-data',則為必要專案。 ParameterContract[]
schemaId 架構標識碼。 只有在 'contentType' 值不是 'application/x-www-form-urlencoded' 或 'multipart/form-data' 時才適用。 字串
typeName 架構所定義的類型名稱。 只有在 'contentType' 值不是 'application/x-www-form-urlencoded' 或 'multipart/form-data' 時才適用。 字串

ResponseContract

名字 描述 價值
描述 作業回應描述。 字串
作業回應標頭的集合。 ParameterContract[]
交涉 作業回應表示的集合。 RepresentationContract[]
statusCode 作業回應 HTTP 狀態代碼。 int (必要)

Terraform (AzAPI 提供者) 資源定義

您可以使用目標作業來部署服務/apis/operations 資源類型:

  • 資源群組

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔

資源格式

若要建立 Microsoft.ApiManagement/service/apis/operations 資源,請將下列 Terraform 新增至您的範本。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.ApiManagement/service/apis/operations@2022-08-01"
  name = "string"
  parent_id = "string"
  body = jsonencode({
    properties = {
      description = "string"
      displayName = "string"
      method = "string"
      policies = "string"
      request = {
        description = "string"
        headers = [
          {
            defaultValue = "string"
            description = "string"
            examples = {
              {customized property} = {
                description = "string"
                externalValue = "string"
                summary = "string"
              }
            }
            name = "string"
            required = bool
            schemaId = "string"
            type = "string"
            typeName = "string"
            values = [
              "string"
            ]
          }
        ]
        queryParameters = [
          {
            defaultValue = "string"
            description = "string"
            examples = {
              {customized property} = {
                description = "string"
                externalValue = "string"
                summary = "string"
              }
            }
            name = "string"
            required = bool
            schemaId = "string"
            type = "string"
            typeName = "string"
            values = [
              "string"
            ]
          }
        ]
        representations = [
          {
            contentType = "string"
            examples = {
              {customized property} = {
                description = "string"
                externalValue = "string"
                summary = "string"
              }
            }
            formParameters = [
              {
                defaultValue = "string"
                description = "string"
                examples = {
                  {customized property} = {
                    description = "string"
                    externalValue = "string"
                    summary = "string"
                  }
                }
                name = "string"
                required = bool
                schemaId = "string"
                type = "string"
                typeName = "string"
                values = [
                  "string"
                ]
              }
            ]
            schemaId = "string"
            typeName = "string"
          }
        ]
      }
      responses = [
        {
          description = "string"
          headers = [
            {
              defaultValue = "string"
              description = "string"
              examples = {
                {customized property} = {
                  description = "string"
                  externalValue = "string"
                  summary = "string"
                }
              }
              name = "string"
              required = bool
              schemaId = "string"
              type = "string"
              typeName = "string"
              values = [
                "string"
              ]
            }
          ]
          representations = [
            {
              contentType = "string"
              examples = {
                {customized property} = {
                  description = "string"
                  externalValue = "string"
                  summary = "string"
                }
              }
              formParameters = [
                {
                  defaultValue = "string"
                  description = "string"
                  examples = {
                    {customized property} = {
                      description = "string"
                      externalValue = "string"
                      summary = "string"
                    }
                  }
                  name = "string"
                  required = bool
                  schemaId = "string"
                  type = "string"
                  typeName = "string"
                  values = [
                    "string"
                  ]
                }
              ]
              schemaId = "string"
              typeName = "string"
            }
          ]
          statusCode = int
        }
      ]
      templateParameters = [
        {
          defaultValue = "string"
          description = "string"
          examples = {
            {customized property} = {
              description = "string"
              externalValue = "string"
              summary = "string"
            }
          }
          name = "string"
          required = bool
          schemaId = "string"
          type = "string"
          typeName = "string"
          values = [
            "string"
          ]
        }
      ]
      urlTemplate = "string"
    }
  })
}

屬性值

service/apis/operations

名字 描述 價值
類型 資源類型 “Microsoft.ApiManagement/service/apis/operations@2022-08-01”
名字 資源名稱 字串 (必要)

字元限制:1-80

合法字元:
英數位元和連字元。

以字母開頭,並以英數位元結尾。
parent_id 此資源為父系之資源的標識碼。 類型的資源標識碼:apis
性能 作業合約的屬性。 OperationContractProperties

OperationContractProperties

名字 描述 價值
描述 作業的描述。 可能包含 HTML 格式標記。 字串

約束:
最大長度 = 1000
displayName 作業名稱。 字串 (必要)

約束:
最小長度 = 1
最大長度 = 300
方法 有效的 HTTP 作業方法。 一般 Http 方法,例如 GET、PUT、POST,但不受限制。 字串 (必要)
政策 作業原則 字串
請求 包含要求詳細數據的實體。 RequestContract
反應 作業回應的陣列。 ResponseContract[]
templateParameters URL 樣本參數的集合。 ParameterContract[]
urlTemplate 識別此作業之目標資源的相對URL範本。 可能包含參數。 範例:/customers/{cid}/orders/{oid}/?date={date} 字串 (必要)

約束:
最小長度 = 1
最大長度 = 1000

RequestContract

名字 描述 價值
描述 作業要求描述。 字串
作業要求標頭的集合。 ParameterContract[]
queryParameters 作業要求查詢參數的集合。 ParameterContract[]
交涉 作業要求表示法的集合。 RepresentationContract[]

ParameterContract

名字 描述 價值
defaultValue 預設參數值。 字串
描述 參數描述。 字串
例子 針對參數定義的範例。 ParameterExamplesContract
名字 參數名稱。 字串 (必要)
必填 指定參數是否為必要。 bool
schemaId 架構標識碼。 字串
類型 參數類型。 字串 (必要)
typeName 架構所定義的類型名稱。 字串
參數值。 string[]

ParameterExamplesContract

名字 描述 價值
{自定義屬性} ParameterExampleContract

ParameterExampleContract

名字 描述 價值
描述 範例的長描述 字串
externalValue 指向常值範例的 URL 字串
總結 範例的簡短描述 字串
價值 範例值。 可以是基本值或物件。

RepresentationContract

名字 描述 價值
contentType 指定這個表示法的已註冊或自定義內容類型,例如 application/xml。 字串 (必要)
例子 針對表示法定義的範例。 ParameterExamplesContract
formParameters 表單參數的集合。 如果 'contentType' 值為 'application/x-www-form-urlencoded' 或 'multipart/form-data',則為必要專案。 ParameterContract[]
schemaId 架構標識碼。 只有在 'contentType' 值不是 'application/x-www-form-urlencoded' 或 'multipart/form-data' 時才適用。 字串
typeName 架構所定義的類型名稱。 只有在 'contentType' 值不是 'application/x-www-form-urlencoded' 或 'multipart/form-data' 時才適用。 字串

ResponseContract

名字 描述 價值
描述 作業回應描述。 字串
作業回應標頭的集合。 ParameterContract[]
交涉 作業回應表示的集合。 RepresentationContract[]
statusCode 作業回應 HTTP 狀態代碼。 int (必要)