Delen via


Api Issue Attachment - Create Or Update

Hiermee maakt u een nieuwe bijlage voor het probleem in een API of werkt u een bestaande bijlage bij.

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

URI-parameters

Name In Vereist Type Description
apiId
path True

string

minLength: 1
maxLength: 80

API-id. Moet uniek zijn in het huidige EXEMPLAAR van de API Management-service.

attachmentId
path True

string

minLength: 1
maxLength: 256
pattern: ^[^*#&+:<>?]+$

Bijlage-id binnen een probleem. Moet uniek zijn in het huidige probleem.

issueId
path True

string

minLength: 1
maxLength: 256
pattern: ^[^*#&+:<>?]+$

Probleem-id. Moet uniek zijn in het huidige EXEMPLAAR van de API Management-service.

resourceGroupName
path True

string

De naam van de resourcegroep.

serviceName
path True

string

minLength: 1
maxLength: 50
pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$

De naam van de API Management-service.

subscriptionId
path True

string

Abonnementsreferenties die het Microsoft Azure-abonnement uniek identificeren. De abonnements-id maakt deel uit van de URI voor elke serviceoproep.

api-version
query True

string

Versie van de API die moet worden gebruikt met de clientaanvraag.

Aanvraagkoptekst

Name Vereist Type Description
If-Match

string

ETag van de entiteit. Niet vereist bij het maken van een entiteit, maar vereist bij het bijwerken van een entiteit.

Aanvraagbody

Name Vereist Type Description
properties.content True

string

Een HTTP-koppeling of met Base64 gecodeerde binaire gegevens.

properties.contentFormat True

string

'koppeling' als inhoud wordt geleverd via een HTTP-koppeling of het MIME-type van de met Base64 gecodeerde binaire gegevens die zijn opgegeven in de eigenschap 'inhoud'.

properties.title True

string

Bestandsnaam waarmee de binaire gegevens worden opgeslagen.

Antwoorden

Name Type Description
200 OK

IssueAttachmentContract

Api-probleembijlage is bijgewerkt

Kopteksten

ETag: string

201 Created

IssueAttachmentContract

Nieuwe api-probleembijlage toegevoegd

Kopteksten

ETag: string

Other Status Codes

ErrorResponse

Foutreactie waarin wordt beschreven waarom de bewerking is mislukt.

Beveiliging

azure_auth

Azure Active Directory OAuth2 Flow.

Type: oauth2
Stroom: implicit
Autorisatie-URL: https://login.microsoftonline.com/common/oauth2/authorize

Bereiken

Name Description
user_impersonation Uw gebruikersaccount imiteren

Voorbeelden

ApiManagementCreateApiIssueAttachment

Voorbeeldaanvraag

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

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

Voorbeeldrespons

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

Definities

Name Description
ErrorFieldContract

Foutveldcontract.

ErrorResponse

Foutreactie.

IssueAttachmentContract

Details van bijlagecontract uitgeven.

ErrorFieldContract

Foutveldcontract.

Name Type Description
code

string

Foutcode op eigenschapsniveau.

message

string

Leesbare weergave van fout op eigenschapsniveau.

target

string

Eigenschapsnaam.

ErrorResponse

Foutreactie.

Name Type Description
error.code

string

Door de service gedefinieerde foutcode. Deze code fungeert als een substatus voor de HTTP-foutcode die is opgegeven in het antwoord.

error.details

ErrorFieldContract[]

De lijst met ongeldige velden die in de aanvraag worden verzonden, in het geval van een validatiefout.

error.message

string

Leesbare weergave van de fout.

IssueAttachmentContract

Details van bijlagecontract uitgeven.

Name Type Description
id

string

Volledig gekwalificeerde resource-id voor de resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

name

string

De naam van de resource

properties.content

string

Een HTTP-koppeling of met Base64 gecodeerde binaire gegevens.

properties.contentFormat

string

'koppeling' als inhoud wordt geleverd via een HTTP-koppeling of het MIME-type van de met Base64 gecodeerde binaire gegevens die zijn opgegeven in de eigenschap 'inhoud'.

properties.title

string

Bestandsnaam waarmee de binaire gegevens worden opgeslagen.

type

string

Het type resource. Bijvoorbeeld 'Microsoft.Compute/virtualMachines' of 'Microsoft.Storage/storageAccounts'