Microsoft.ApiManagement service/apis/schemas 2021-08-01

Bicep 資源定義

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

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

資源格式

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

resource symbolicname 'Microsoft.ApiManagement/service/apis/schemas@2021-08-01' = {
  name: 'string'
  parent: resourceSymbolicName
  properties: {
    contentType: 'string'
    document: {
      components: any()
      definitions: any()
      value: 'string'
    }
  }
}

屬性值

service/apis/schemas

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

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

字元限制:1-80

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

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

如需詳細資訊,請參閱 父資源外部的子資源
類型資源的符號名稱:apis
性能 API 架構的屬性。 SchemaContractProperties

SchemaContractProperties

名字 描述 價值
contentType 必須是 Content-Type 標頭中使用的有效媒體類型,如 RFC 2616 中所定義。 架構文件的媒體類型(例如 application/json、application/xml)。
- Swagger 架構使用 application/vnd.ms-azure-apim.swagger.definitions+json
- WSDL 架構使用 application/vnd.ms-azure-apim.xsd+xml
- OpenApi 架構使用 application/vnd.oai.openapi.components+json
- WADL Schema 使用 application/vnd.ms-azure-apim.wadl.grammars+xml
字串 (必要)
公文 建立或更新 API 架構檔的屬性。 SchemaDocumentProperties

SchemaDocumentProperties

名字 描述 價值
元件 類型定義。 僅用於 Swagger/OpenAPI v2/v3 架構,否則為 null。 針對 Bicep,您可以使用 any() 函式。
定義 類型定義。 僅用於 Swagger/OpenAPI v1 架構,否則為 null。 針對 Bicep,您可以使用 any() 函式。
價值 定義代表架構之檔的 Json 逸出字串。 用於 Swagger/OpenAPI 以外的架構。 字串

ARM 樣本資源定義

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

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

資源格式

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

{
  "type": "Microsoft.ApiManagement/service/apis/schemas",
  "apiVersion": "2021-08-01",
  "name": "string",
  "properties": {
    "contentType": "string",
    "document": {
      "components": {},
      "definitions": {},
      "value": "string"
    }
  }
}

屬性值

service/apis/schemas

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

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

字元限制:1-80

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

以字母開頭,並以英數位元結尾。
性能 API 架構的屬性。 SchemaContractProperties

SchemaContractProperties

名字 描述 價值
contentType 必須是 Content-Type 標頭中使用的有效媒體類型,如 RFC 2616 中所定義。 架構文件的媒體類型(例如 application/json、application/xml)。
- Swagger 架構使用 application/vnd.ms-azure-apim.swagger.definitions+json
- WSDL 架構使用 application/vnd.ms-azure-apim.xsd+xml
- OpenApi 架構使用 application/vnd.oai.openapi.components+json
- WADL Schema 使用 application/vnd.ms-azure-apim.wadl.grammars+xml
字串 (必要)
公文 建立或更新 API 架構檔的屬性。 SchemaDocumentProperties

SchemaDocumentProperties

名字 描述 價值
元件 類型定義。 僅用於 Swagger/OpenAPI v2/v3 架構,否則為 null。
定義 類型定義。 僅用於 Swagger/OpenAPI v1 架構,否則為 null。
價值 定義代表架構之檔的 Json 逸出字串。 用於 Swagger/OpenAPI 以外的架構。 字串

Terraform (AzAPI 提供者) 資源定義

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

  • 資源群組

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

資源格式

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

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.ApiManagement/service/apis/schemas@2021-08-01"
  name = "string"
  parent_id = "string"
  body = jsonencode({
    properties = {
      contentType = "string"
      document = {
        value = "string"
      }
    }
  })
}

屬性值

service/apis/schemas

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

字元限制:1-80

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

以字母開頭,並以英數位元結尾。
parent_id 此資源為父系之資源的標識碼。 類型的資源標識碼:apis
性能 API 架構的屬性。 SchemaContractProperties

SchemaContractProperties

名字 描述 價值
contentType 必須是 Content-Type 標頭中使用的有效媒體類型,如 RFC 2616 中所定義。 架構文件的媒體類型(例如 application/json、application/xml)。
- Swagger 架構使用 application/vnd.ms-azure-apim.swagger.definitions+json
- WSDL 架構使用 application/vnd.ms-azure-apim.xsd+xml
- OpenApi 架構使用 application/vnd.oai.openapi.components+json
- WADL Schema 使用 application/vnd.ms-azure-apim.wadl.grammars+xml
字串 (必要)
公文 建立或更新 API 架構檔的屬性。 SchemaDocumentProperties

SchemaDocumentProperties

名字 描述 價值
元件 類型定義。 僅用於 Swagger/OpenAPI v2/v3 架構,否則為 null。
定義 類型定義。 僅用於 Swagger/OpenAPI v1 架構,否則為 null。
價值 定義代表架構之檔的 Json 逸出字串。 用於 Swagger/OpenAPI 以外的架構。 字串