Api Issue Attachment - Create Or Update

API の問題の新しい添付ファイルを作成するか、既存のものを更新します。

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/apis/{apiId}/issues/{issueId}/attachments/{attachmentId}?api-version=2022-08-01

URI パラメーター

名前 / 必須 説明
apiId
path True

string

API 識別子。 現在のAPI Management サービス インスタンスで一意である必要があります。

attachmentId
path True

string

Issue 内の添付ファイル識別子。 現在の Issue で一意である必要があります。

Regex pattern: ^[^*#&+:<>?]+$

issueId
path True

string

問題識別子。 現在のAPI Management サービス インスタンスで一意である必要があります。

Regex pattern: ^[^*#&+:<>?]+$

resourceGroupName
path True

string

リソース グループの名前。 名前の大文字と小文字は区別されます。

serviceName
path True

string

API Management サービスの名前。

Regex pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$

subscriptionId
path True

string

ターゲット サブスクリプションの ID。

api-version
query True

string

この操作に使用する API バージョン。

要求ヘッダー

名前 必須 説明
If-Match

string

エンティティの ETag。 エンティティを作成する場合は必須ではありませんが、エンティティを更新する場合は必須です。

要求本文

名前 必須 説明
properties.content True

string

HTTP リンクまたは Base64 でエンコードされたバイナリ データ。

properties.contentFormat True

string

コンテンツが HTTP リンクを介して提供される場合は 'link' か、'content' プロパティで提供される Base64 でエンコードされたバイナリ データの MIME の種類のいずれかです。

properties.title True

string

バイナリ データを保存するファイル名。

応答

名前 説明
200 OK

IssueAttachmentContract

API の問題の添付ファイルが正常に更新されました

Headers

ETag: string

201 Created

IssueAttachmentContract

新しい API の問題の添付ファイルが正常に追加されました

Headers

ETag: string

Other Status Codes

ErrorResponse

操作に失敗した理由を説明するエラー応答。

セキュリティ

azure_auth

Azure Active Directory OAuth2 フロー。

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名前 説明
user_impersonation ユーザー アカウントの借用

ApiManagementCreateApiIssueAttachment

Sample Request

PUT https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc/attachments/57d2ef278aa04f0888cba3f3?api-version=2022-08-01

{
  "properties": {
    "title": "Issue attachment.",
    "contentFormat": "image/jpeg",
    "content": "IEJhc2U2NA=="
  }
}

Sample Response

{
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc/attachments/57d2ef278aa04f0888cba3f3",
  "type": "Microsoft.ApiManagement/service/apis/issues/attachments",
  "name": "57d2ef278aa04f0888cba3f3",
  "properties": {
    "title": "Issue attachment.",
    "contentFormat": "link",
    "content": "https://.../image.jpg"
  }
}
{
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/57d1f7558aa04f15146d9d8a/issues/57d2ef278aa04f0ad01d6cdc/attachments/57d2ef278aa04f0888cba3f3",
  "type": "Microsoft.ApiManagement/service/apis/issues/attachments",
  "name": "57d2ef278aa04f0888cba3f3",
  "properties": {
    "title": "Issue attachment.",
    "contentFormat": "link",
    "content": "https://.../image.jpg"
  }
}

定義

名前 説明
ErrorFieldContract

エラー フィールド コントラクト。

ErrorResponse

エラー応答。

IssueAttachmentContract

添付ファイルの契約の詳細を発行します。

ErrorFieldContract

エラー フィールド コントラクト。

名前 説明
code

string

プロパティ レベルのエラー コード。

message

string

プロパティ レベルエラーの人間が判読できる表現。

target

string

プロパティ名。

ErrorResponse

エラー応答。

名前 説明
error.code

string

サービスによって定義されたエラー コード。 このコードは、応答に指定された HTTP エラー コードのサブステータスとして機能します。

error.details

ErrorFieldContract[]

検証エラーが発生した場合に要求で送信される無効なフィールドの一覧。

error.message

string

人が判読できるエラーの表現。

IssueAttachmentContract

添付ファイルの契約の詳細を発行します。

名前 説明
id

string

リソースの完全修飾リソース ID。 例 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

リソースの名前

properties.content

string

HTTP リンクまたは Base64 でエンコードされたバイナリ データ。

properties.contentFormat

string

コンテンツが HTTP リンクを介して提供される場合は 'link' か、'content' プロパティで提供される Base64 でエンコードされたバイナリ データの MIME の種類のいずれかです。

properties.title

string

バイナリ データを保存するファイル名。

type

string

リソースの型。 例: "Microsoft.Compute/virtualMachines" または "Microsoft.Storage/storageAccounts"