Api Issue Attachment - Create Or Update

API'de Sorun için yeni bir Ek oluşturur veya mevcut bir eki güncelleştirir.

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 Parametreleri

Name İçinde Gerekli Tür Description
apiId
path True

string

API tanımlayıcısı. Geçerli API Management hizmet örneğinde benzersiz olmalıdır.

attachmentId
path True

string

Sorun içindeki ek tanımlayıcısı. Geçerli Sorunda benzersiz olmalıdır.

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

issueId
path True

string

Sorun tanımlayıcısı. Geçerli API Management hizmet örneğinde benzersiz olmalıdır.

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

resourceGroupName
path True

string

Kaynak grubunun adı. Ad büyük/küçük harfe duyarlı değildir.

serviceName
path True

string

API Management hizmetinin adı.

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

subscriptionId
path True

string

Hedef aboneliğin kimliği.

api-version
query True

string

Bu işlem için kullanılacak API sürümü.

İstek Başlığı

Name Gerekli Tür Description
If-Match

string

Varlığın ETag'i. Varlık oluştururken gerekli değildir, ancak varlığı güncelleştirirken gereklidir.

İstek Gövdesi

Name Gerekli Tür Description
properties.content True

string

HTTP bağlantısı veya Base64 ile kodlanmış ikili veriler.

properties.contentFormat True

string

İçerik bir HTTP bağlantısı aracılığıyla sağlanıyorsa 'bağlantı' veya 'content' özelliğinde sağlanan Base64 kodlu ikili verilerin MIME türü.

properties.title True

string

İkili verilerin kaydedileceği dosya adı.

Yanıtlar

Name Tür Description
200 OK

IssueAttachmentContract

API sorunu eki başarıyla güncelleştirildi

Headers

ETag: string

201 Created

IssueAttachmentContract

Yeni API sorunu eki başarıyla eklendi

Headers

ETag: string

Other Status Codes

ErrorResponse

İşlemin neden başarısız olduğunu açıklayan hata yanıtı.

Güvenlik

azure_auth

Azure Active Directory OAuth2 Flow.

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

Scopes

Name Description
user_impersonation kullanıcı hesabınızın kimliğine bürünme

Örnekler

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"
  }
}

Tanımlar

Name Description
ErrorFieldContract

Hata Alanı sözleşmesi.

ErrorResponse

Hata Yanıtı.

IssueAttachmentContract

Sorun Eki Sözleşme ayrıntıları.

ErrorFieldContract

Hata Alanı sözleşmesi.

Name Tür Description
code

string

Özellik düzeyi hata kodu.

message

string

Özellik düzeyi hatanın insan tarafından okunabilir gösterimi.

target

string

Özellik adı.

ErrorResponse

Hata Yanıtı.

Name Tür Description
error.code

string

Hizmet tanımlı hata kodu. Bu kod, yanıtta belirtilen HTTP hata kodu için bir alt durum görevi görür.

error.details

ErrorFieldContract[]

Doğrulama hatası durumunda istekte gönderilen geçersiz alanların listesi.

error.message

string

Hatanın insan tarafından okunabilen gösterimi.

IssueAttachmentContract

Sorun Eki Sözleşme ayrıntıları.

Name Tür Description
id

string

Kaynağın tam kaynak kimliği. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

Kaynağın adı

properties.content

string

HTTP bağlantısı veya Base64 ile kodlanmış ikili veriler.

properties.contentFormat

string

İçerik bir HTTP bağlantısı aracılığıyla sağlanıyorsa 'bağlantı' veya 'content' özelliğinde sağlanan Base64 kodlu ikili verilerin MIME türü.

properties.title

string

İkili verilerin kaydedileceği dosya adı.

type

string

Kaynağın türü. Örneğin, "Microsoft.Compute/virtualMachines" veya "Microsoft.Storage/storageAccounts"