Microsoft.ApiManagement service/apis/operations
Bicep 資源定義
服務/apis/operations 資源類型可以使用目標作業來部署:
- 資源群組 - 請參閱 資源群組部署命令
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
資源格式
若要建立 Microsoft.ApiManagement/service/apis/operations 資源,請將下列 Bicep 新增至範本。
resource symbolicname 'Microsoft.ApiManagement/service/apis/operations@2023-05-01-preview' = {
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()
}
{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()
}
{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()
}
{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()
}
{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()
}
{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()
}
{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()
}
{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()
}
{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
名稱 | 描述 | 值 |
---|---|---|
NAME | 資源名稱 瞭解如何在 Bicep 中設定子資源的名稱和類型。 |
需要字串 () 字元限制:1-80 合法字元: 英數字元和連字號。 以字母開頭,並以英數字元結尾。 |
父系 (parent) | 在 Bicep 中,您可以指定子資源的父資源。 只有在父資源外部宣告子資源時,才需要新增此屬性。 如需詳細資訊,請參閱 父資源外部的子資源。 |
類型資源的符號名稱: apis |
properties | 作業合約的屬性。 | OperationContractProperties |
OperationContractProperties
名稱 | 描述 | 值 |
---|---|---|
description | 作業的描述。 可包含 HTML 格式標籤。 | 字串 |
displayName | 作業名稱。 | 需要字串 () |
method | 有效的 HTTP 作業方法。 一般 Http 方法,例如 GET、PUT、POST,但不受限制。 | 需要字串 () |
原則 | 作業原則 | 字串 |
要求 | 包含要求詳細資料的實體。 | RequestContract |
responses | 作業回應的陣列。 | ResponseContract[] |
templateParameters | URL 樣本參數的集合。 | ParameterContract[] |
urlTemplate | 可識別此作業之目標資源的相對 URL 範本。 可包含參數。 範例:/customers/{cid}/orders/{oid}/?date={date} | 需要字串 () |
RequestContract
名稱 | 描述 | 值 |
---|---|---|
description | 作業要求描述。 | 字串 |
headers | 操作要求標頭的集合。 | ParameterContract[] |
queryParameters | 操作要求查詢參數的集合。 | ParameterContract[] |
representations | 作業要求表示法的集合。 | RepresentationContract[] |
ParameterContract
名稱 | 描述 | 值 |
---|---|---|
defaultValue | 預設參數值。 | 字串 |
description | 參數描述。 | 字串 |
範例 | 針對參數定義的範例。 | ParameterExamplesContract |
NAME | 參數名稱。 | 需要字串 () |
必要 | 指定參數是否為必要。 | bool |
schemaId | 架構標識碼。 | 字串 |
type | 參數類型。 | 需要字串 () |
typeName | 架構所定義的類型名稱。 | 字串 |
值 | 參數值。 | string[] |
ParameterExamplesContract
名稱 | 描述 | 值 |
---|---|---|
{自定義屬性} | ParameterExampleContract | |
{自定義屬性} | ParameterExampleContract |
ParameterExampleContract
名稱 | 描述 | 值 |
---|---|---|
description | 範例的完整描述 | 字串 |
externalValue | 指向常值範例的 URL | 字串 |
摘要 | 範例的簡短描述 | 字串 |
value | 範例值。 可以是基本值或物件。 | 針對 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
名稱 | 描述 | 值 |
---|---|---|
description | 作業回應描述。 | 字串 |
headers | 作業回應標頭的集合。 | ParameterContract[] |
representations | 作業回應表示法的集合。 | RepresentationContract[] |
statusCode | 作業回應 HTTP 狀態代碼。 | 需要 int () |
ARM 範本資源定義
服務/apis/operations 資源類型可以使用目標作業來部署:
- 資源群組 - 請參閱 資源群組部署命令
如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。
資源格式
若要建立 Microsoft.ApiManagement/service/apis/operations 資源,請將下列 JSON 新增至範本。
{
"type": "Microsoft.ApiManagement/service/apis/operations",
"apiVersion": "2023-05-01-preview",
"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": {}
},
"{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": {}
},
"{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": {}
},
"{customized property}": {
"description": "string",
"externalValue": "string",
"summary": "string",
"value": {}
}
},
"formParameters": [
{
"defaultValue": "string",
"description": "string",
"examples": {
"{customized property}": {
"description": "string",
"externalValue": "string",
"summary": "string",
"value": {}
},
"{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": {}
},
"{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": {}
},
"{customized property}": {
"description": "string",
"externalValue": "string",
"summary": "string",
"value": {}
}
},
"formParameters": [
{
"defaultValue": "string",
"description": "string",
"examples": {
"{customized property}": {
"description": "string",
"externalValue": "string",
"summary": "string",
"value": {}
},
"{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": {}
},
"{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 版本 | '2023-05-01-preview' |
NAME | 資源名稱 請參閱如何在 JSON ARM 樣本中設定子資源的名稱和類型。 |
字串 (必要) 字元限制:1-80 合法字元: 英數字元和連字號。 以字母開頭,並以英數字元結尾。 |
properties | 作業合約的屬性。 | OperationContractProperties |
OperationContractProperties
名稱 | 描述 | 值 |
---|---|---|
description | 作業的描述。 可包含 HTML 格式標籤。 | 字串 |
displayName | 作業名稱。 | 字串 (必要) |
method | 有效的 HTTP 作業方法。 一般 Http 方法,例如 GET、PUT、POST,但不限於它們。 | 字串 (必要) |
原則 | 作業原則 | 字串 |
要求 | 包含要求詳細資料的實體。 | RequestContract |
responses | 作業回應的陣列。 | ResponseContract[] |
templateParameters | URL 樣本參數的集合。 | ParameterContract[] |
urlTemplate | 可識別此作業之目標資源的相對 URL 範本。 可包含參數。 範例:/customers/{cid}/orders/{oid}/?date={date} | 字串 (必要) |
RequestContract
名稱 | 描述 | 值 |
---|---|---|
description | 作業要求描述。 | 字串 |
headers | 操作要求標頭的集合。 | ParameterContract[] |
queryParameters | 操作要求查詢參數的集合。 | ParameterContract[] |
representations | 作業要求表示法的集合。 | RepresentationContract[] |
ParameterContract
名稱 | 描述 | 值 |
---|---|---|
defaultValue | 預設參數值。 | 字串 |
description | 參數描述。 | 字串 |
範例 | 針對參數定義的範例。 | ParameterExamplesContract |
NAME | 參數名稱。 | 字串 (必要) |
必要 | 指定參數是否為必要。 | bool |
schemaId | 架構標識碼。 | 字串 |
type | 參數類型。 | 字串 (必要) |
typeName | 架構所定義的類型名稱。 | 字串 |
值 | 參數值。 | string[] |
ParameterExamplesContract
名稱 | 描述 | 值 |
---|---|---|
{自定義屬性} | ParameterExampleContract | |
{自定義屬性} | ParameterExampleContract |
ParameterExampleContract
名稱 | 描述 | 值 |
---|---|---|
description | 範例的完整描述 | 字串 |
externalValue | 指向常值範例的 URL | 字串 |
摘要 | 範例的簡短描述 | 字串 |
value | 範例值。 可以是基本值或物件。 |
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
名稱 | 描述 | 值 |
---|---|---|
description | 作業回應描述。 | 字串 |
headers | 作業回應標頭的集合。 | ParameterContract[] |
representations | 作業回應表示法的集合。 | 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@2023-05-01-preview"
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"
}
{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"
}
{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"
}
{customized property} = {
description = "string"
externalValue = "string"
summary = "string"
}
}
formParameters = [
{
defaultValue = "string"
description = "string"
examples = {
{customized property} = {
description = "string"
externalValue = "string"
summary = "string"
}
{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"
}
{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"
}
{customized property} = {
description = "string"
externalValue = "string"
summary = "string"
}
}
formParameters = [
{
defaultValue = "string"
description = "string"
examples = {
{customized property} = {
description = "string"
externalValue = "string"
summary = "string"
}
{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"
}
{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@2023-05-01-preview” |
NAME | 資源名稱 | 需要字串 () 字元限制:1-80 合法字元: 英數字元和連字號。 以字母開頭,並以英數字元結尾。 |
parent_id | 此資源父系之資源的標識碼。 | 類型資源的標識碼: apis |
properties | 作業合約的屬性。 | OperationContractProperties |
OperationContractProperties
名稱 | 描述 | 值 |
---|---|---|
description | 作業的描述。 可包含 HTML 格式標籤。 | 字串 |
displayName | 作業名稱。 | 需要字串 () |
method | 有效的 HTTP 作業方法。 一般 Http 方法,例如 GET、PUT、POST,但不受限制。 | 需要字串 () |
原則 | 作業原則 | 字串 |
要求 | 包含要求詳細資料的實體。 | RequestContract |
responses | 作業回應的陣列。 | ResponseContract[] |
templateParameters | URL 樣本參數的集合。 | ParameterContract[] |
urlTemplate | 可識別此作業之目標資源的相對 URL 範本。 可包含參數。 範例:/customers/{cid}/orders/{oid}/?date={date} | 需要字串 () |
RequestContract
名稱 | 描述 | 值 |
---|---|---|
description | 作業要求描述。 | 字串 |
headers | 操作要求標頭的集合。 | ParameterContract[] |
queryParameters | 操作要求查詢參數的集合。 | ParameterContract[] |
representations | 作業要求表示法的集合。 | RepresentationContract[] |
ParameterContract
名稱 | 描述 | 值 |
---|---|---|
defaultValue | 預設參數值。 | 字串 |
description | 參數描述。 | 字串 |
範例 | 針對參數定義的範例。 | ParameterExamplesContract |
NAME | 參數名稱。 | 需要字串 () |
必要 | 指定參數是否為必要。 | bool |
schemaId | 架構標識碼。 | 字串 |
type | 參數類型。 | 需要字串 () |
typeName | 架構所定義的類型名稱。 | 字串 |
值 | 參數值。 | string[] |
ParameterExamplesContract
名稱 | 描述 | 值 |
---|---|---|
{自定義屬性} | ParameterExampleContract | |
{自定義屬性} | ParameterExampleContract |
ParameterExampleContract
名稱 | 描述 | 值 |
---|---|---|
description | 範例的完整描述 | 字串 |
externalValue | 指向常值範例的 URL | 字串 |
摘要 | 範例的簡短描述 | 字串 |
value | 範例值。 可以是基本值或物件。 |
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
名稱 | 描述 | 值 |
---|---|---|
description | 作業回應描述。 | 字串 |
headers | 作業回應標頭的集合。 | ParameterContract[] |
representations | 作業回應表示法的集合。 | RepresentationContract[] |
statusCode | 作業回應 HTTP 狀態代碼。 | int (必要) |
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應