Delen via


Productopname-API voor containers

De Productopname-API is een gemoderniseerde API waarmee alle bestaande inzendings-API's in alle commerciële marketplace-producten worden gecombineerd. Raadpleeg de API voor productopname voor meer informatie over hoe u aan de slag kunt gaan.

Dit artikel bevat richtlijnen voor het gebruik van de API's specifiek voor containers.

Bestaande resourceconfiguraties ophalen

Haal alle resources binnen een specifiek product op in één API-aanroep.

GET resource-tree/<product-durableID>?$version=<schema-version>

U kunt alle resourceconfiguraties binnen een specifiek product ophalen met behulp van het resourcetype resourcestructuur, samen met de duurzame id van het product. De schemaversie die u opgeeft, wordt gebruikt als de maximaal ondersteunde versie voor elk van de toepasselijke resources van het aangevraagde product.

Notitie

Als u de duurzame id van het product niet weet, kunt u de productresource eerst ophalen met behulp van de externe id van het product en wordt uitgevoerd. Zie Product-API: Methode 1: resourcestructuur voor meer informatie.

Voorbeeld van GET-aanroep:

GET https://graph.microsoft.com/rp/product-ingestion/resource-tree/product/12345678-abcd-efgh-1234-12345678901?targetType=" preview"&$version=2022-03-01-preview5

Voorbeeldantwoord:

{
  "$schema": "https://schema.mp.microsoft.com/schema/resource-tree/2022-03-01-preview2",
  "root": "product/12345678-abcd-efgh-1234-12345678901",
  "target": {
    "targetType": "preview"
  },
  "resources": [
  { 
    "$schema": "https://schema.mp.microsoft.com/schema/product/2022-03-01-preview3",
    "id": "product/12345678-abcd-efgh-1234-12345678901",
    "identity": {
      "externalID": "product_external_id_example"
    },
    "type": "azureContainer",
    "alias": "product_example"
  },
  { 
    "$schema": "https://schema.mp.microsoft.com/schema/commercial-marketplace-setup/2022-03-01-preview2",
    "id": "commercial-marketplace-setup/12345678-abcd-efgh-1234-12345678901",
    "product": "product/12345678-abcd-efgh-1234-12345678901",
    "sellThroughMicrosoft": true
  },
  {
    "$schema": "https://schema.mp.microsoft.com/schema/plan/2022-03-01-preview2",
    "id": "plan/12345678-abcd-efgh-1234-12345678901/98756328-04e9-55ae-9403-52b6c971a956
  ...
  }, 
     // The response would include all existing resources within this product.
  {
     ...
  }]
}

Privé-doelgroepen synchroniseren

Voor een liveproduct kunnen updates voor privé-doelgroepen in de concept-, preview- en liveomgevingen tegelijkertijd worden uitgevoerd zonder dat hiervoor een publicatie is vereist. U kunt de privé-doelgroep synchroniseren met behulp van de resource 'prijs-en-beschikbaarheid-update-privé-doelgroepen' door op te geven welke doelgroepen u wilt toevoegen aan of verwijderen uit een specifiek abonnement. Hiermee worden de concept-, preview- en liveomgevingen gesynchroniseerd met dezelfde privé-doelgroepwaarden. U hoeft de inzendingsresource niet op te geven bij het synchroniseren van de privé-doelgroep.

Als u de conceptdoelgroepen wilt bewerken, gebruikt u de resource 'price-and-availability-plan' en de eigenschap privateAudiences. Dit moet de normale publicatiestroom doorlopen om de waarden in preview en live in te stellen.

Belangrijk

Als uw product meer dan één type id ondersteunt om de privé-doelgroep te configureren (bijvoorbeeld tenant-id's en abonnements-id's), moet u een volledige publicatie uitvoeren als u voor het eerst een nieuw id-type opgeeft. In dit geval kunt u de privé-doelgroep niet synchroniseren.

Voorbeeldaanvraag voor het synchroniseren van de configuratie van de privé-doelgroep:

POST https://graph.microsoft.com/rp/product-ingestion/configure?$version=2022-03-01-preview2

{
  "$schema": "https://schema.mp.microsoft.com/schema/configure/2022-03-01-preview2"
  "resources": [
  {
    "$schema": "https://schema.mp.microsoft.com/schema/price-and-availability-update-private-audiences/2022-03-01-preview3",
    "product": "product/12345678-abcd-efgh-1234-12345678901", // product durable ID
    "plan": "plan/12345678-abcd-efgh-1234-12345678901/7e70b11f-809e-4c45-ae2f-1fb3ceaca33b", //plan durable ID 
    "privateAudiences":
    {
      "add ":
      [
         {
   "type": "tenant",
           "id": " c0cab000-5c00-2ae9-acbe-f5f0bb264498 ",
           "label": "test 1"
         }
      ],
      "remove ":
      [
        {
    "type": "tenant",
           "id": " d1cab000-6c06-4ae9-acbe-b5f0bb264498 ",
           "label": "test 2"
        }
      ]
    }
  }
 ]
}

Eigenschappen configureren

Definieer de categorieën en branches die van toepassing zijn op uw containerproduct, uw app-versie en juridische contracten. Zorg ervoor dat u volledige en nauwkeurige gegevens over uw product opgeeft in de resource Eigenschappen, zodat het op de juiste manier wordt weergegeven en aan de juiste set klanten wordt aangeboden. Zie Appsource-categorieën voor meer informatie.

Voorbeeld van aanvraagbody voor het configureren van eigenschappen:

POST https://graph.microsoft.com/rp/product-ingestion/configure?$version=2022-03-01-preview2

{
  "$schema": "https://schema.mp.microsoft.com/schema/configure/2022-03-01-preview2"
  "resources": [
    {
      "$schema": "https://schema.mp.microsoft.com/schema/property/2022-03-01-preview5",
      "id": "property/a8b48be1-a630-41b5-b5a5-c2a9f7789922/public/main",
      "product": "product/a8b48be1-a630-41b5-b5a5-c2a9f7789922",
      "kind": "azureContainer",
      "termsConditions": "standardMicrosoft",
      "categories": {
        "containers": [
          "container-apps",
   "container-images"
        ]
      }
    }
 ]
}

Vermelding configureren

De informatie die u opgeeft via vermeldingsbronnen, wordt weergegeven in de online winkels van microsoft commerciële marketplace. Dit omvat de beschrijvingen van uw product, schermopnamen en uw marketingassets.

Voorbeeld van aanvraagbody voor het configureren van vermelding:

POST https://graph.microsoft.com/rp/product-ingestion/configure?$version=2022-03-01-preview2

{
  "$schema": "https://schema.mp.microsoft.com/schema/configure/2022-03-01-preview2"
  "resources": [
    {
      "$schema": "https://schema.mp.microsoft.com/schema/listing/2022-03-01-preview5",
      "id": "listing/6d50c7bd-eb19-4d4c-b2f0-beb14aee084b/public/main/default/en-us",
      "product": "product/6d50c7bd-eb19-4d4c-b2f0-beb14aee084b",
      "kind": "azureContainer",
      "title": "ContainerCM0815",
      "description": "<div>This offer is in the early stages of development and not for general public consumption. Use is restricted to a limited audience, and has no commercial purpose beyond the testing for which it is intended.</div>",
      "searchResultSummary": "Container product",
      "shortDescription": "This offer is in the early stages of development and not for general public consumption",
      "privacyPolicyLink": "https://www.company.com/privacy",
      "generalLinks": [
 {
   "displayText": "Product link",
   "link": "https://www.company.com/mkt",
 }
      ],
      "globalSupportWebsite": "https://testprivacyurl.com",
      "governmentSupportWebsite": "https://testprivacyurl.com",
      "supportContact": {
        "name": "Support",
        "email": "support@company.com",
        "phone": "4255555555"
      },
      "engineeringContact": {
        "name": "Engineering",
        "email": "john@company.com",
        "phone": "4255555555"
      },
      "cloudSolutionProviderContact": {
        "name": "CSP",
        "email": "csp@company.com",
        "phone": "4255555555"
      },
      "languageID": "en-us"
    },
    {
      "$schema": "https://schema.mp.microsoft.com/schema/listing-asset/2022-03-01-preview5",
      "product": "product/6d50c7bd-eb19-4d4c-b2f0-beb14aee084b",
      "kind": "azure",
      "listing": "listing/6d50c7bd-eb19-4d4c-b2f0-beb14aee084b/public/main/default/en-us",
      "type": "azureLogoScreenshot",
      "languageID": "en-us",
      "description": "Image caption",
      "displayOrder": 0,
      "fileName": "test.png",
      "friendlyName": "test.png",
      "url": "https://company.com/12345/test.png"
    },
    {
      "$schema":  "https://schema.mp.microsoft.com/schema/listing-asset/2022-03-01-preview5",
      "product": "product/6d50c7bd-eb19-4d4c-b2f0-beb14aee084b",
      "kind": "azure",
      "listing": "listing/6d50c7bd-eb19-4d4c-b2f0-beb14aee084b/public/main/default/en-us",
      "type": "azureLogoLarge",
      "languageID": "en-us",
      "description": "",
      "displayOrder": 0,
      "fileName": "216x216.png",
      "friendlyName": "216x216.png",
      "url": "https://company.com/12345/216x216.png"
    },
    {
      "$schema": "https://schema.mp.microsoft.com/schema/listing-trailer/2022-03-01-preview5",
      "product": "product/6d50c7bd-eb19-4d4c-b2f0-beb14aee084b",
      "kind": "azure",
      "listing": "listing/6d50c7bd-eb19-4d4c-b2f0-beb14aee084b/public/main/default/en-us",
      "streamingUrl": "https://www.youtube.com/watch?v=123",
      "assets": {
        "en-us": {
          "title": "Video",
          "imageList": [
            {
              "url": "https://company.com/12345/trailer.png"
            }
          ]
        }
      }
    }
  ]
}

Preview-doelgroep configureren

Als uw containerproduct wordt verkocht via de Microsoft Marketplace, moet u een preview-doelgroep definiëren, via abonnements-id's, die uw productvermelding kunnen bekijken voordat deze live gaat.

Voorbeeld van aanvraagbody voor het configureren van preview-doelgroep:

POST https://graph.microsoft.com/rp/product-ingestion/configure?$version=2022-03-01-preview2

{
  "$schema": "https://schema.mp.microsoft.com/schema/configure/2022-03-01-preview2"
  "resources": [
    {
      "$schema": "https://schema.mp.microsoft.com/schema/price-and-availability-offer/2022-03-01-preview3",
     "id": "price-and-availability-offer/a8b48be1-a630-41b5-b5a5-c2a9f7789922",
     "product": "product/a8b48be1-a630-41b5-b5a5-c2a9f7789922",
     "previewAudiences": [
       {
        "type": "subscription",
        "id": "c2d12fa0-c012-33b0-b0a0-c0a0a0011222",
        "label": "Test Subscription"
       }
     ]
    }
  ]
}

Een plan configureren - technische configuratie

Geef een clusterextensietypenaam op in de indeling PublisherName.ApplicationName. De naam moet uniek zijn in al uw aanbiedingen en abonnementen. U kunt deze waarde niet wijzigen zodra het plan is gepubliceerd in preview. Zie Technische configuratie instellen voor een kubernetes-containeraanbieding op basis van een Kubernetes-toepassing voor meer informatie. Zie technische assets voor Azure-containers voor meer informatie.

Voorbeeld van aanvraagbody voor het configureren van transactable technische configuratie:

POST https://graph.microsoft.com/rp/product-ingestion/configure?$version=2022-03-01-preview2

{
  "$schema": "https://schema.mp.microsoft.com/schema/configure/2022-03-01-preview2"
  "resources": [
   {
      "$schema": "https://schema.mp.microsoft.com/schema/container-plan-technical-configuration/2022-03-01-preview3",
      "id": "container-plan-technical-configuration/a8b48be1-a630-41b5-b5a5-c2a9f7789922",
      "product": "product/a8b48be1-a630-41b5-b5a5-c2a9f7789922",
      "plan": "plan/a8b48be1-a630-41b5-b5a5-c2a9f7789922/4db792e6-8e10-439d-9db2-a0e98fa7e174",
      "payloadType": " cnab",
      "clusterExtensionType": " unique.extension.type",
      "cnabReferences": [
 {
          "tenantID": "421c00000-ac12-451e-b3ff-c5b469a13e2d",
          "subscriptionID": "537d2130-be25-451e-b3ff-c5b469a13e2d",
          "resourceGroupName": "TestResources",
          "registryName": "testregistry",
          "repositoryName": "containerrepo",
   "tag": "1.0.4",
          "digest": "sha256:000193bfefde1e9"
        },
      ]
    },
  ]
}

Een abonnement configureren - prijs en beschikbaarheid

Voorbeeld van aanvraagbody voor het configureren van een verborgen plan:

POST https://graph.microsoft.com/rp/product-ingestion/configure?$version=2022-03-01-preview2

{
  "$schema": "https://schema.mp.microsoft.com/schema/configure/2022-03-01-preview2"
  "resources": [
  {
      "$schema": "https://schema.mp.microsoft.com/schema/price-and-availability-plan/2022-03-01-preview4",
      "product": "product/a8b48be1-a630-41b5-b5a5-c2a9f7789922",
      "plan": "plan/a8b48be1-a630-41b5-b5a5-c2a9f7789922/0abbe45b-c405-4c08-bb14-ec485002084e",
      "visibility": "hidden",
      "audience": "public"
    }
  ]
}

Container biedt ondersteuning voor verschillende factureringsopties. Zie Licentieopties voor meer informatie over de ondersteunde factureringsmodellen.

API-versies en -updates

Bijwerken Wat is er veranderd?
1-2024 Alle schema-eindpunten zijn bijgewerkt van product-ingestion.azureedge.net naar schema.mp.microsoft.com