Microsoft.ApiManagement service/apis 2021-08-01

Bicep 資源定義

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

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

資源格式

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

resource symbolicname 'Microsoft.ApiManagement/service/apis@2021-08-01' = {
  name: 'string'
  parent: resourceSymbolicName
  properties: {
    apiRevision: 'string'
    apiRevisionDescription: 'string'
    apiType: 'string'
    apiVersion: 'string'
    apiVersionDescription: 'string'
    apiVersionSet: {
      description: 'string'
      id: 'string'
      name: 'string'
      versionHeaderName: 'string'
      versioningScheme: 'string'
      versionQueryName: 'string'
    }
    apiVersionSetId: 'string'
    authenticationSettings: {
      oAuth2: {
        authorizationServerId: 'string'
        scope: 'string'
      }
      openid: {
        bearerTokenSendingMethods: [
          'string'
        ]
        openidProviderId: 'string'
      }
    }
    contact: {
      email: 'string'
      name: 'string'
      url: 'string'
    }
    description: 'string'
    displayName: 'string'
    format: 'string'
    isCurrent: bool
    license: {
      name: 'string'
      url: 'string'
    }
    path: 'string'
    protocols: [
      'string'
    ]
    serviceUrl: 'string'
    sourceApiId: 'string'
    subscriptionKeyParameterNames: {
      header: 'string'
      query: 'string'
    }
    subscriptionRequired: bool
    termsOfServiceUrl: 'string'
    type: 'string'
    value: 'string'
    wsdlSelector: {
      wsdlEndpointName: 'string'
      wsdlServiceName: 'string'
    }
  }
}

屬性值

service/apis

名稱 描述
NAME 資源名稱

瞭解如何在 Bicep 中設定子資源的名稱和類型。
需要字串 ()

字元限制:1-80

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

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

如需詳細資訊,請參閱 父資源外部的子資源
類型資源的符號名稱: service
properties API 實體建立更新屬性。 ApiCreateOrUpdatePropertiesOrApiContractProperties

ApiCreateOrUpdatePropertiesOrApiContractProperties

名稱 描述
apiRevision 描述 API 的修訂。 如果未提供任何值,則會建立預設修訂 1 字串
apiRevisionDescription API 修訂的描述。 字串
apiType 要建立的 API 類型。
* http 建立 REST API
* soap 建立 SOAP 傳遞 API
* websocket 建立 Websocket API
* graphql 會建立 GraphQL API。
'graphql'
'http'
'soap'
'websocket'
apiVersion 指出 API 的版本識別碼,如果 API 已建立版本設定 字串
apiVersionDescription API 版本的描述。 字串
apiVersionSet 版本設定詳細數據 ApiVersionSetContractDetails
apiVersionSetId 相關 ApiVersionSet 的資源標識碼。 字串
authenticationSettings 此 API 中包含的驗證設定集合。 AuthenticationSettingsContract
連絡人 API 的連絡資訊。 ApiContactInformation
description API 的描述。 可包含 HTML 格式標籤。 字串
displayName API 名稱。 長度必須為 1 到 300 個字元。 字串
format 匯入 API 的內容格式。 'graphql-link'
'openapi'
'openapi+json'
'openapi+json-link'
'openapi-link'
'swagger-json'
'swagger-link-json'
'wadl-link-json'
'wadl-xml'
'wsdl'
'wsdl-link'
isCurrent 指出 API 修訂是否為目前的 API 修訂。 bool
授權 API 的授權資訊。 ApiLicenseInformation
path 可在 API 管理服務執行個體內唯一識別此 API 及其所有資源路徑的相對 URL。 此路徑會附加至在服務執行個體建立期間所指定的 API 端點基底 URL,以形成此 API 的公用 URL。 需要字串 ()
protocols 描述此 API 中的作業可在哪些通訊協定上叫用。 包含任何項目的字串數組:
'http'
'https'
'ws'
'wss'
serviceUrl 實作此 API 之後端服務的絕對 URL。 長度不能超過 2000 個字元。 字串
sourceApiId 來源 API 的 API 識別碼。 字串
subscriptionKeyParameterNames API 可供使用的通訊協定。 SubscriptionKeyParameterNamesContract
subscriptionRequired 指定存取 API 是否需要 API 或產品訂用帳戶。 bool
termsOfServiceUrl API 服務條款的 URL。 必須是 URL 的格式。 字串
type API 的類型。 'graphql'
'http'
'soap'
'websocket'
匯入 API 時的內容值。 字串
wsdlSelector 限制將 WSDL 匯入至檔的子集的準則。 ApiCreateOrUpdatePropertiesWsdlSelector

ApiVersionSetContractDetails

名稱 描述
description API 版本集的描述。 字串
id 現有 API 版本集的識別碼。 省略此值以建立新的版本集。 字串
NAME API 版本集的顯示名稱。 字串
versionHeaderName 如果 versioningScheme 設定 header為 ,表示 API 版本的 HTTP 標頭參數名稱。 字串
versioningScheme 值,決定 API 版本識別碼在 HTTP 要求中的位置。 'Header'
'Query'
'Segment'
versionQueryName 如果 versioningScheme 設定 query為 ,則為指出 API 版本的查詢參數名稱。 字串

AuthenticationSettingsContract

名稱 描述
oAuth2 OAuth2 驗證設定 OAuth2AuthenticationSettingsContract
openid OpenID Connect 驗證設定 OpenIdAuthenticationSettingsContract

OAuth2AuthenticationSettingsContract

名稱 描述
authorizationServerId OAuth 授權伺服器識別碼。 字串
範圍 作業範圍。 字串

OpenIdAuthenticationSettingsContract

名稱 描述
bearerTokenSendingMethods 如何將令牌傳送至伺服器。 包含任何項目的字串數組:
'authorizationHeader'
'query'
openidProviderId OAuth 授權伺服器識別碼。 字串

ApiContactInformation

名稱 描述
電子郵件 連絡人/組織的電子郵件位址。 必須是電子郵件位址的格式 字串
NAME 聯繫人/組織的識別名稱 字串
url 指向聯繫人資訊的 URL。 必須是 URL 的格式 字串

ApiLicenseInformation

名稱 描述
NAME 用於 API 的授權名稱 字串
url 用於 API 之授權的 URL。 必須是 URL 的格式 字串

SubscriptionKeyParameterNamesContract

名稱 描述
header 訂用帳戶金鑰標頭名稱。 字串
查詢 訂用帳戶金鑰查詢字串參數名稱。 字串

ApiCreateOrUpdatePropertiesWsdlSelector

名稱 描述
wsdlEndpointName 要從 WSDL 匯入的端點 (埠) 名稱 字串
wsdlServiceName 要從 WSDL 匯入的服務名稱 字串

快速入門範本

下列快速入門範本會部署此資源類型。

範本 描述
使用範本建立 API 管理執行個體和所有子資源

部署至 Azure
此範本示範如何建立 API 管理 服務及設定子實體
在 Azure API 管理 前面建立 Azure Front Door

部署至 Azure
此範例示範如何使用 Azure Front Door 作為 Azure API 管理 前面的全域負載平衡器。

ARM 範本資源定義

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

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

資源格式

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

{
  "type": "Microsoft.ApiManagement/service/apis",
  "apiVersion": "2021-08-01",
  "name": "string",
  "properties": {
    "apiRevision": "string",
    "apiRevisionDescription": "string",
    "apiType": "string",
    "apiVersion": "string",
    "apiVersionDescription": "string",
    "apiVersionSet": {
      "description": "string",
      "id": "string",
      "name": "string",
      "versionHeaderName": "string",
      "versioningScheme": "string",
      "versionQueryName": "string"
    },
    "apiVersionSetId": "string",
    "authenticationSettings": {
      "oAuth2": {
        "authorizationServerId": "string",
        "scope": "string"
      },
      "openid": {
        "bearerTokenSendingMethods": [ "string" ],
        "openidProviderId": "string"
      }
    },
    "contact": {
      "email": "string",
      "name": "string",
      "url": "string"
    },
    "description": "string",
    "displayName": "string",
    "format": "string",
    "isCurrent": "bool",
    "license": {
      "name": "string",
      "url": "string"
    },
    "path": "string",
    "protocols": [ "string" ],
    "serviceUrl": "string",
    "sourceApiId": "string",
    "subscriptionKeyParameterNames": {
      "header": "string",
      "query": "string"
    },
    "subscriptionRequired": "bool",
    "termsOfServiceUrl": "string",
    "type": "string",
    "value": "string",
    "wsdlSelector": {
      "wsdlEndpointName": "string",
      "wsdlServiceName": "string"
    }
  }
}

屬性值

service/apis

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

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

字元限制:1-80

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

以字母開頭,並以英數字元結尾。
properties API 實體建立更新屬性。 ApiCreateOrUpdatePropertiesOrApiContractProperties

ApiCreateOrUpdatePropertiesOrApiContractProperties

名稱 描述
apiRevision 描述 API 的修訂。 如果未提供任何值,則會建立預設修訂 1 字串
apiRevisionDescription API 修訂的描述。 字串
apiType 要建立的 API 類型。
* http 建立 REST API
* soap 建立 SOAP 傳遞 API
* websocket 建立 Websocket API
* graphql 會建立 GraphQL API。
'graphql'
'http'
'soap'
'websocket'
apiVersion 如果 API 已設定版本,則表示 API 的版本識別碼 字串
apiVersionDescription API 版本的描述。 字串
apiVersionSet 版本設定詳細數據 ApiVersionSetContractDetails
apiVersionSetId 相關 ApiVersionSet 的資源標識碼。 字串
authenticationSettings 包含在此 API 中的驗證設定集合。 AuthenticationSettingsContract
連絡人 API 的連絡資訊。 ApiContactInformation
description API 的描述。 可包含 HTML 格式標籤。 字串
displayName API 名稱。 長度必須為 1 到 300 個字元。 字串
format 匯入 API 的內容格式。 'graphql-link'
'openapi'
'openapi+json'
'openapi+json-link'
'openapi-link'
'swagger-json'
'swagger-link-json'
'wadl-link-json'
'wadl-xml'
'wsdl'
'wsdl-link'
isCurrent 指出 API 修訂是否為目前的 API 修訂。 bool
授權 API 的授權資訊。 ApiLicenseInformation
path 可在 API 管理服務執行個體內唯一識別此 API 及其所有資源路徑的相對 URL。 此路徑會附加至在服務執行個體建立期間所指定的 API 端點基底 URL,以形成此 API 的公用 URL。 字串 (必要)
protocols 描述此 API 中的作業可在哪些通訊協定上叫用。 包含任何項目的字串數組:
'http'
'https'
'ws'
'wss'
serviceUrl 實作此 API 之後端服務的絕對 URL。 長度不能超過 2000 個字元。 字串
sourceApiId 來源 API 的 API 識別碼。 字串
subscriptionKeyParameterNames 可供使用 API 的通訊協定。 SubscriptionKeyParameterNamesContract
subscriptionRequired 指定需要 API 或產品訂用帳戶才能存取 API。 bool
termsOfServiceUrl API 服務條款的 URL。 必須是 URL 的格式。 字串
type API 的類型。 'graphql'
'http'
'soap'
'websocket'
匯入 API 時的內容值。 字串
wsdlSelector 將 WSDL 匯入至檔子集的準則。 ApiCreateOrUpdatePropertiesWsdlSelector

ApiVersionSetContractDetails

名稱 描述
description API 版本集的描述。 字串
id 現有 API 版本集的識別碼。 省略此值以建立新的版本集。 字串
NAME API 版本集的顯示名稱。 字串
versionHeaderName 如果 versioningScheme 設定 header為 ,表示 API 版本的 HTTP 標頭參數名稱。 字串
versioningScheme 值,決定 API 版本識別碼在 HTTP 要求中的位置。 'Header'
'Query'
'Segment'
versionQueryName 如果 versioningScheme 設定 query為 ,則為指出 API 版本的查詢參數名稱。 字串

AuthenticationSettingsContract

名稱 描述
oAuth2 OAuth2 驗證設定 OAuth2AuthenticationSettingsContract
openid OpenID Connect 驗證設定 OpenIdAuthenticationSettingsContract

OAuth2AuthenticationSettingsContract

名稱 描述
authorizationServerId OAuth 授權伺服器識別碼。 字串
範圍 作業範圍。 字串

OpenIdAuthenticationSettingsContract

名稱 描述
bearerTokenSendingMethods 如何將令牌傳送至伺服器。 包含任何項目的字串數組:
'authorizationHeader'
'query'
openidProviderId OAuth 授權伺服器識別碼。 字串

ApiContactInformation

名稱 描述
電子郵件 連絡人/組織的電子郵件位址。 必須是電子郵件位址的格式 字串
NAME 聯繫人/組織的識別名稱 字串
url 指向聯繫人資訊的 URL。 必須是 URL 的格式 字串

ApiLicenseInformation

名稱 描述
NAME 用於 API 的授權名稱 字串
url 用於 API 之授權的 URL。 必須是 URL 的格式 字串

SubscriptionKeyParameterNamesContract

名稱 描述
header 訂用帳戶金鑰標頭名稱。 字串
查詢 訂用帳戶金鑰查詢字串參數名稱。 字串

ApiCreateOrUpdatePropertiesWsdlSelector

名稱 描述
wsdlEndpointName 要從 WSDL 匯入的端點 (埠) 名稱 字串
wsdlServiceName 要從 WSDL 匯入的服務名稱 字串

快速入門範本

下列快速入門範本會部署此資源類型。

範本 描述
使用範本建立 API 管理執行個體和所有子資源

部署至 Azure
此範本示範如何建立 API 管理 服務及設定子實體
在 Azure API 管理 前面建立 Azure Front Door

部署至 Azure
此範例示範如何使用 Azure Front Door 作為 Azure API 管理 前面的全域負載平衡器。

Terraform (AzAPI 提供者) 資源定義

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

  • 資源群組

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

資源格式

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

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.ApiManagement/service/apis@2021-08-01"
  name = "string"
  parent_id = "string"
  body = jsonencode({
    properties = {
      apiRevision = "string"
      apiRevisionDescription = "string"
      apiType = "string"
      apiVersion = "string"
      apiVersionDescription = "string"
      apiVersionSet = {
        description = "string"
        id = "string"
        name = "string"
        versionHeaderName = "string"
        versioningScheme = "string"
        versionQueryName = "string"
      }
      apiVersionSetId = "string"
      authenticationSettings = {
        oAuth2 = {
          authorizationServerId = "string"
          scope = "string"
        }
        openid = {
          bearerTokenSendingMethods = [
            "string"
          ]
          openidProviderId = "string"
        }
      }
      contact = {
        email = "string"
        name = "string"
        url = "string"
      }
      description = "string"
      displayName = "string"
      format = "string"
      isCurrent = bool
      license = {
        name = "string"
        url = "string"
      }
      path = "string"
      protocols = [
        "string"
      ]
      serviceUrl = "string"
      sourceApiId = "string"
      subscriptionKeyParameterNames = {
        header = "string"
        query = "string"
      }
      subscriptionRequired = bool
      termsOfServiceUrl = "string"
      type = "string"
      value = "string"
      wsdlSelector = {
        wsdlEndpointName = "string"
        wsdlServiceName = "string"
      }
    }
  })
}

屬性值

service/apis

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

字元限制:1-80

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

以字母開頭,並以英數字元結尾。
parent_id 此資源之父系的資源標識碼。 類型資源的標識碼: 服務
properties API 實體建立更新屬性。 ApiCreateOrUpdatePropertiesOrApiContractProperties

ApiCreateOrUpdatePropertiesOrApiContractProperties

名稱 描述
apiRevision 描述 API 的修訂。 如果未提供任何值,則會建立預設修訂 1 字串
apiRevisionDescription API 修訂的描述。 字串
apiType 要建立的 API 類型。
* http 建立 REST API
* soap 建立 SOAP 傳遞 API
* websocket 建立 Websocket API
* graphql 會建立 GraphQL API。
“graphql”
“http”
“soap”
“websocket”
apiVersion 如果 API 已設定版本,則表示 API 的版本識別碼 字串
apiVersionDescription API 版本的描述。 字串
apiVersionSet 版本設定詳細數據 ApiVersionSetContractDetails
apiVersionSetId 相關 ApiVersionSet 的資源標識碼。 字串
authenticationSettings 包含在此 API 中的驗證設定集合。 AuthenticationSettingsContract
連絡人 API 的連絡資訊。 ApiContactInformation
description API 的描述。 可包含 HTML 格式標籤。 字串
displayName API 名稱。 長度必須為 1 到 300 個字元。 字串
format 匯入 API 的內容格式。 “graphql-link”
“openapi”
“openapi+json”
“openapi+json-link”
“openapi-link”
“swagger-json”
“swagger-link-json”
“wadl-link-json”
“wadl-xml”
“wsdl”
“wsdl-link”
isCurrent 指出 API 修訂是否為目前的 API 修訂。 bool
授權 API 的授權資訊。 ApiLicenseInformation
path 可在 API 管理服務執行個體內唯一識別此 API 及其所有資源路徑的相對 URL。 此路徑會附加至在服務執行個體建立期間所指定的 API 端點基底 URL,以形成此 API 的公用 URL。 需要字串 ()
protocols 描述此 API 中的作業可在哪些通訊協定上叫用。 包含任何項目的字串數組:
“http”
“https”
“ws”
“wss”
serviceUrl 實作此 API 之後端服務的絕對 URL。 長度不能超過 2000 個字元。 字串
sourceApiId 來源 API 的 API 識別碼。 字串
subscriptionKeyParameterNames API 可供使用的通訊協定。 SubscriptionKeyParameterNamesContract
subscriptionRequired 指定存取 API 是否需要 API 或產品訂用帳戶。 bool
termsOfServiceUrl API 服務條款的 URL。 必須是 URL 的格式。 字串
type API 的類型。 “graphql”
“http”
“soap”
“websocket”
匯入 API 時的內容值。 字串
wsdlSelector 限制將 WSDL 匯入至檔的子集的準則。 ApiCreateOrUpdatePropertiesWsdlSelector

ApiVersionSetContractDetails

名稱 描述
description API 版本集的描述。 字串
id 現有 API 版本集的識別碼。 省略此值以建立新的版本集。 字串
NAME API 版本集的顯示名稱。 字串
versionHeaderName 如果 versioningScheme 設定 header為 ,表示 API 版本的 HTTP 標頭參數名稱。 字串
versioningScheme 值,決定 API 版本識別碼在 HTTP 要求中的位置。 「標頭」
“Query”
“Segment”
versionQueryName 如果 versioningScheme 設定 query為 ,則為指出 API 版本的查詢參數名稱。 字串

AuthenticationSettingsContract

名稱 描述
oAuth2 OAuth2 驗證設定 OAuth2AuthenticationSettingsContract
openid OpenID Connect 驗證設定 OpenIdAuthenticationSettingsContract

OAuth2AuthenticationSettingsContract

名稱 描述
authorizationServerId OAuth 授權伺服器識別碼。 字串
範圍 作業範圍。 字串

OpenIdAuthenticationSettingsContract

名稱 描述
bearerTokenSendingMethods 如何將令牌傳送至伺服器。 包含任何項目的字串數組:
“authorizationHeader”
“query”
openidProviderId OAuth 授權伺服器識別碼。 字串

ApiContactInformation

名稱 描述
電子郵件 連絡人/組織的電子郵件位址。 必須是電子郵件位址的格式 字串
NAME 聯繫人/組織的識別名稱 字串
url 指向聯繫人資訊的 URL。 必須是 URL 的格式 字串

ApiLicenseInformation

名稱 描述
NAME 用於 API 的授權名稱 字串
url 用於 API 之授權的 URL。 必須是 URL 的格式 字串

SubscriptionKeyParameterNamesContract

名稱 描述
header 訂用帳戶金鑰標頭名稱。 字串
查詢 訂用帳戶金鑰查詢字串參數名稱。 字串

ApiCreateOrUpdatePropertiesWsdlSelector

名稱 描述
wsdlEndpointName 要從 WSDL 匯入的端點 (埠) 名稱 字串
wsdlServiceName 要從 WSDL 匯入的服務名稱 字串