Api Operation - Update
識別子で指定された API の操作の詳細を更新します。
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/operations/{operationId}?api-version=2021-08-01
URI パラメーター
名前 | / | 必須 | 型 | 説明 |
---|---|---|---|---|
api
|
path | True |
string |
API リビジョン識別子。 現在のAPI Management サービス インスタンスで一意である必要があります。 現在以外のリビジョンには があります。rev=n はサフィックスで、n はリビジョン番号です。 正規表現パターン: |
operation
|
path | True |
string |
API 内の操作識別子。 現在のAPI Management サービス インスタンスで一意である必要があります。 |
resource
|
path | True |
string |
リソース グループの名前。 |
service
|
path | True |
string |
API Management サービスの名前。 正規表現パターン: |
subscription
|
path | True |
string |
Microsoft Azure サブスクリプションを一意に識別するサブスクリプション資格情報。 サブスクリプション ID は、全ての修理依頼についてURI の一部を生じさせます。 |
api-version
|
query | True |
string |
クライアント要求で使用される API のバージョン。 |
要求ヘッダー
名前 | 必須 | 型 | 説明 |
---|---|---|---|
If-Match | True |
string |
エンティティの ETag。 ETag は、GET 要求のヘッダー応答からの現在のエンティティ状態と一致する必要があります。または、無条件更新の場合は * にする必要があります。 |
要求本文
名前 | 型 | 説明 |
---|---|---|
properties.description |
string |
操作の説明。 HTML 書式設定タグを含めることができます。 |
properties.displayName |
string |
操作名。 |
properties.method |
string |
有効な HTTP 操作メソッド。 GET、PUT、POST などの一般的な Http メソッドですが、それらに限定されません。 |
properties.policies |
string |
操作ポリシー |
properties.request |
要求の詳細を含むエンティティ。 |
|
properties.responses |
操作応答の配列。 |
|
properties.templateParameters |
URL テンプレート パラメーターのコレクション。 |
|
properties.urlTemplate |
string |
この操作のターゲット リソースを識別する相対 URL テンプレート。 パラメーターを含めることができます。 例: /customers/{cid}/orders/{oid}/?date={date} |
応答
名前 | 型 | 説明 |
---|---|---|
200 OK |
操作が正常に更新されました。 ヘッダー ETag: string |
|
Other Status Codes |
操作に失敗した理由を説明するエラー応答。 |
セキュリティ
azure_auth
Azure Active Directory OAuth2 フロー。
型:
oauth2
フロー:
implicit
Authorization URL (承認 URL):
https://login.microsoftonline.com/common/oauth2/authorize
スコープ
名前 | 説明 |
---|---|
user_impersonation | ユーザー アカウントの借用 |
例
ApiManagementUpdateApiOperation
要求のサンプル
PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/echo-api/operations/operationId?api-version=2021-08-01
{
"properties": {
"displayName": "Retrieve resource",
"method": "GET",
"urlTemplate": "/resource",
"templateParameters": [],
"request": {
"queryParameters": [
{
"name": "param1",
"description": "A sample parameter that is required and has a default value of \"sample\".",
"type": "string",
"defaultValue": "sample",
"required": true,
"values": [
"sample"
]
}
]
},
"responses": [
{
"statusCode": 200,
"description": "Returned in all cases.",
"representations": [],
"headers": []
},
{
"statusCode": 500,
"description": "Server Error.",
"representations": [],
"headers": []
}
]
}
}
応答のサンプル
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d2ef278aa04f0888cba3f3/operations/57d2ef278aa04f0ad01d6cdc",
"type": "Microsoft.ApiManagement/service/apis/operations",
"name": "57d2ef278aa04f0ad01d6cdc",
"properties": {
"displayName": "CancelOrder",
"method": "POST",
"urlTemplate": "/?soapAction=http://tempuri.org/IFazioService/CancelOrder",
"templateParameters": [],
"request": {
"description": "IFazioService_CancelOrder_InputMessage",
"queryParameters": [],
"headers": [],
"representations": [
{
"contentType": "text/xml",
"schemaId": "6980a395-f08b-4a59-8295-1440cbd909b8",
"typeName": "CancelOrder"
}
]
},
"responses": [
{
"statusCode": 200,
"description": "IFazioService_CancelOrder_OutputMessage",
"representations": [
{
"contentType": "text/xml",
"schemaId": "6980a395-f08b-4a59-8295-1440cbd909b8",
"typeName": "CancelOrderResponse"
}
],
"headers": []
}
]
}
}
定義
名前 | 説明 |
---|---|
Error |
エラー フィールド コントラクト。 |
Error |
エラー応答。 |
Operation |
API 操作の詳細。 |
Operation |
API 操作の更新コントラクトの詳細。 |
Parameter |
操作パラメーターの詳細。 |
Parameter |
パラメーターの例。 |
Representation |
操作の要求/応答表現の詳細。 |
Request |
操作要求の詳細。 |
Response |
操作応答の詳細。 |
ErrorFieldContract
エラー フィールド コントラクト。
名前 | 型 | 説明 |
---|---|---|
code |
string |
プロパティ レベルのエラー コード。 |
message |
string |
プロパティ レベルエラーの人間が判読できる表現。 |
target |
string |
プロパティ名。 |
ErrorResponse
エラー応答。
名前 | 型 | 説明 |
---|---|---|
error.code |
string |
サービスによって定義されたエラー コード。 このコードは、応答に指定された HTTP エラー コードのサブステータスとして機能します。 |
error.details |
検証エラーが発生した場合に要求で送信される無効なフィールドの一覧。 |
|
error.message |
string |
人が判読できるエラーの表現。 |
OperationContract
API 操作の詳細。
名前 | 型 | 説明 |
---|---|---|
id |
string |
リソースの完全修飾リソース ID。 例 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name |
string |
リソースの名前 |
properties.description |
string |
操作の説明。 HTML 書式設定タグを含めることができます。 |
properties.displayName |
string |
操作名。 |
properties.method |
string |
有効な HTTP 操作メソッド。 GET、PUT、POST などの一般的な Http メソッドですが、それらに限定されません。 |
properties.policies |
string |
操作ポリシー |
properties.request |
要求の詳細を含むエンティティ。 |
|
properties.responses |
操作応答の配列。 |
|
properties.templateParameters |
URL テンプレート パラメーターのコレクション。 |
|
properties.urlTemplate |
string |
この操作のターゲット リソースを識別する相対 URL テンプレート。 パラメーターを含めることができます。 例: /customers/{cid}/orders/{oid}/?date={date} |
type |
string |
リソースの型。 例: "Microsoft.Compute/virtualMachines" または "Microsoft.Storage/storageAccounts" |
OperationUpdateContract
API 操作の更新コントラクトの詳細。
名前 | 型 | 説明 |
---|---|---|
properties.description |
string |
操作の説明。 HTML 書式設定タグを含めることができます。 |
properties.displayName |
string |
操作名。 |
properties.method |
string |
有効な HTTP 操作メソッド。 GET、PUT、POST などの一般的な Http メソッドですが、それらに限定されません。 |
properties.policies |
string |
操作ポリシー |
properties.request |
要求の詳細を含むエンティティ。 |
|
properties.responses |
操作応答の配列。 |
|
properties.templateParameters |
URL テンプレート パラメーターのコレクション。 |
|
properties.urlTemplate |
string |
この操作のターゲット リソースを識別する相対 URL テンプレート。 パラメーターを含めることができます。 例: /customers/{cid}/orders/{oid}/?date={date} |
ParameterContract
操作パラメーターの詳細。
名前 | 型 | 説明 |
---|---|---|
defaultValue |
string |
パラメーターの既定値。 |
description |
string |
パラメーターの説明。 |
examples |
<string,
Parameter |
パラメーターに対して定義された例。 |
name |
string |
パラメーター名です。 |
required |
boolean |
パラメーターが必要かどうかを指定します。 |
schemaId |
string |
スキーマ識別子。 |
type |
string |
パラメーターの型。 |
typeName |
string |
スキーマで定義された型名。 |
values |
string[] |
パラメーター値。 |
ParameterExampleContract
パラメーターの例。
名前 | 型 | 説明 |
---|---|---|
description |
string |
例の長い説明 |
externalValue |
string |
リテラルの例を指す URL |
summary |
string |
例の簡単な説明 |
value |
値の例。 プリミティブ値またはオブジェクトを指定できます。 |
RepresentationContract
操作の要求/応答表現の詳細。
名前 | 型 | 説明 |
---|---|---|
contentType |
string |
この表現の登録済みコンテンツ タイプまたはカスタム コンテンツ タイプ (application/xml など) を指定します。 |
examples |
<string,
Parameter |
表現に対して定義された例。 |
formParameters |
フォーム パラメーターのコレクション。 'contentType' 値が 'application/x-www-form-urlencoded' または 'multipart/form-data' の場合は必須です。 |
|
schemaId |
string |
スキーマ識別子。 'contentType' 値が 'application/x-www-form-urlencoded' でも 'multipart/form-data' でもない場合にのみ適用されます。 |
typeName |
string |
スキーマで定義された型名。 'contentType' 値が 'application/x-www-form-urlencoded' でも 'multipart/form-data' でもない場合にのみ適用されます。 |
RequestContract
操作要求の詳細。
名前 | 型 | 説明 |
---|---|---|
description |
string |
操作要求の説明。 |
headers |
操作要求のヘッダーのコレクション。 |
|
queryParameters |
操作要求クエリ パラメーターのコレクション。 |
|
representations |
操作要求表現のコレクション。 |
ResponseContract
操作応答の詳細。
名前 | 型 | 説明 |
---|---|---|
description |
string |
操作応答の説明。 |
headers |
操作応答ヘッダーのコレクション。 |
|
representations |
操作応答表現のコレクション。 |
|
statusCode |
integer |
操作応答 HTTP 状態コード。 |