製品の一覧を取得する (国/地域別)

適用対象: パートナー センター | 21Vianet が運営するパートナー センター | Microsoft Cloud for US Government のパートナー センター

次のメソッドを使用して、特定の国/地域で利用可能な製品のコレクションを取得できます。

前提条件

  • パートナー センターの認証に関するページで説明している資格情報。 このシナリオでは、スタンドアロンの App と App+User の両方の資格情報を使用した認証がサポートされています。

  • 国/地域。

C#

製品の一覧を取得するには:

  1. ByCountry() メソッドを使用して国/地域を選択するには、IAggregatePartner.Products コレクションを使用します

  2. ByTargetView() メソッドを使用してカタログ ビューを選択します。

  3. (省略可能)ByReservationScope() メソッドを使用して予約スコープを選択します。

  4. (省略可能)ByTargetSegment() メソッドを使用してターゲット セグメントを選択します。

  5. Get() または GetAsync() メソッドを呼び出してコレクションを返します。

IAggregatePartner partnerOperations;

// Get the products for the specified catalog view.
ResourceCollection<Products> products = partnerOperations.Products.ByCountry("US").ByTargetView("MicrosoftAzure").Get();

// Get the products filtered by target view and target segment.
ResourceCollection<Products> products = partnerOperations.Products.ByCountry("US").ByTargetView("MicrosoftAzure").ByTargetSegment("commercial").Get();

// Get the products for Azure reservations which are applicable to Microsoft Azure (MS-AZR-0145P) subscriptions only.
ResourceCollection<Product> products = partnerOperations.Products.ByCountry("US").ByTargetView("AzureReservations").Get();

// Get the products for Azure reservations which are applicable to Azure plans only.
ResourceCollection<Product> products = partnerOperations.Products.ByCountry("US").ByTargetView("AzureReservations").ByReservationScope("AzurePlan").Get();

Java

パートナー センター Java SDK を使用して、パートナー センター リソースを管理できます。 これは、パートナー コミュニティによってメインされ、Microsoft によって正式にサポートされていないオープンソース プロジェクトです。 問題が発生した場合は、コミュニティから支援を得るか、GitHub に問題を投稿することができます。

製品の一覧を取得するには:

  1. ByCountry() 関数を 使用して国を選択するには、IAggregatePartner.getProducts 関数を 使用 します。

  2. byTargetView() 関数を使用してカタログ ビューを選択します。

  3. (省略可能)byTargetSegment() 関数を使用してターゲット セグメントを選択します。

  4. get() 関数を呼び出してコレクションを返します。

// IAggregatePartner partnerOperations;

// Get the products for the specified catalog view.
ResourceCollection<Products> products = partnerOperations.getProducts().byCountry("US").byTargetView("Azure").get();

// Get the products filtered by target view and target segment.
ResourceCollection<Products> products = partnerOperations.getProducts().byCountry("US").byTargetView("Azure").byTargetSegment("commercial").get();

PowerShell

パートナー センター PowerShell モジュールを使用して、パートナー センター リソースを管理できます。 これは、パートナー コミュニティによってメインされ、Microsoft によって正式にサポートされていないオープンソース プロジェクトです。 問題が発生した場合は、コミュニティから支援を得るか、GitHub に問題を投稿することができます。

製品の一覧を取得するには:

  1. Get-PartnerProduct コマンドを実行します。

  2. Catalog パラメーターを指定してカタログ選択します。

  3. (省略可能)Segment パラメーターを指定して、ターゲット セグメント選択します。

Get-PartnerProduct -Catalog 'Azure' -Segment 'commercial'

REST 要求

要求の構文

認証方法 要求 URI
GET {baseURL}/v1/products?country={country}>targetView={targetView}>targetSegment={targetSegment} HTTP/1.1

URI パラメーター

次のパスとクエリ パラメーターを使用して、製品の一覧を取得します。

名前 タイプ Required 説明
country string はい 国/地域 ID。
targetView string はい カタログのターゲット ビューを識別します。 サポートされている値は次のとおりです。

Azure(すべての Azure 項目を含む)

すべての Azure 予約項目を含む AzureReservations

すべての仮想マシン (VM) 予約項目を含む AzureReservationsVM

すべての SQL 予約項目を含む AzureReservationsSQL

すべての Cosmos データベース予約項目を含む AzureReservationsCosmosDb

Microsoft Azure サブスクリプション (MS-AZR-0145P) と Azure プランの項目を含む MicrosoftAzure

OnlineServices。従来のライセンス ベースのサービスや新しいコマース ライセンス ベースのサービスなど、すべてのオンライン サービス項目が含まれます。

すべてのソフトウェア項目を含むソフトウェア

SoftwareSU Standard Edition Linux。すべてのソフトウェア SU Standard Edition Linux 項目が含まれます。

SoftwarePerpetual。永続的なソフトウェア項目がすべて含まれています

SoftwareSubscriptions(すべてのソフトウェア サブスクリプション項目を含む)

SpecializedOffers。一部のパートナーが利用できる特殊なオファーが含まれています

独立系ソフトウェア ベンダー (ISV) によって公開されたすべてのコマーシャル マーケットプレース オファーを含む MarketplaceSaaS
targetSegment string いいえ ターゲット セグメントを識別します。 さまざまな対象ユーザーのビュー。 サポートされている値は次のとおりです。

商業
education
government
非 営利
reservationScope string いいえ Azure Reservations の製品の一覧を照会する場合は、Azure プランに適用できる製品の一覧を取得するように指定 reservationScope=AzurePlan します。 Microsoft Azure (MS-AZR-0145P) サブスクリプションに適用できる Azure 予約の製品の一覧を取得するには、このパラメーターを除外します。

要求ヘッダー

詳細については、「パートナー センター REST ヘッダー」を参照してください。

要求本文

なし。

要求の例

国別の製品

次の例に従って、Microsoft Azure (MS-AZR-0145P) サブスクリプションと Azure プランの国別の製品の一覧を取得します。

GET https://api.partnercenter.microsoft.com/v1/products?country=US&targetView=MicrosoftAzure HTTP/1.1
Authorization: Bearer
Accept: application/json
MS-RequestId: 031160b2-b0b0-4d40-b2b1-aaa9bb84211d
MS-CorrelationId: 7c1f6619-c176-4040-a88f-2c71f3ba4533

Azure VM の予約 (Azure プラン)

次の例に従って、Azure プランに適用される Azure VM 予約の国別の製品の一覧を取得します。

GET https://api.partnercenter.microsoft.com/v1/products?country=US&targetView=AzureAzureReservationsVM&reservationScope=AzurePlan HTTP/1.1
Authorization: Bearer
Accept: application/json
MS-RequestId: 031160b2-b0b0-4d40-b2b1-aaa9bb84211d
MS-CorrelationId: 7c1f6619-c176-4040-a88f-2c71f3ba4533

Microsoft Azure (MS-AZR-0145P) サブスクリプションの Azure VM 予約

次の例に従って、Microsoft Azure (MS-AZR-0145P) サブスクリプションに適用される Azure VM 予約の国別の製品の一覧を取得します。

GET https://api.partnercenter.microsoft.com/v1/products?country=US&targetView=AzureReservationsVM HTTP/1.1
Authorization: Bearer
Accept: application/json
MS-RequestId: 031160b2-b0b0-4d40-b2b1-aaa9bb84211d
MS-CorrelationId: 7c1f6619-c176-4040-a88f-2c71f3ba4533

新しいコマース ライセンス ベースのサービス

Note

ライセンスベースのサービスの新しいコマース エクスペリエンスには、多くの新機能が含まれており、すべてのクラウド ソリューション プロバイダー (CSP) で利用できます。 詳細については、新しいコマース エクスペリエンスの概要を参照してください。

次の例に従って、新しいコマース エクスペリエンスのテクニカル プレビューの一部として、新しいコマース ライセンス ベースのサービスの国別の製品の一覧を取得します。 新しいコマース ライセンス ベースのサービスは、OnlineServicesNCEID 値と displayNames 値によって識別されます。 以下の応答の例を参照してください。

GET https://api.partnercenter.microsoft.com/v1/products?country=US&targetView=OnlineServices HTTP/1.1
Authorization: Bearer
Accept: application/json
MS-RequestId: 031160b2-b0b0-4d40-b2b1-aaa9bb84211d
MS-CorrelationId: 7c1f6619-c176-4040-a88f-2c71f3ba4533

REST 応答

成功した場合、応答本文には Product リソースのコレクションが含まれます。

応答の成功とエラーのコード

各応答には、成功または失敗を示す HTTP ステータス コードと、追加のデバッグ情報が付属しています。 このコード、エラーの種類、追加のパラメーターを読み取るには、ネットワーク トレース ツールを使用します。 完全な一覧については、パートナー センターのエラー コードを参照してください

このメソッドは、次のエラー コードを返します。

HTTP 状態コード エラー コード 説明
403 400030 要求された targetSegment へのアクセスは許可されません。
403 400036 要求された targetView へのアクセスは許可されていません。

Azure VM 予約の応答の例 (Azure プラン)

{
    "totalCount": 19,
    "items": [
        {
            "id": "DZH318Z0BQ3Q",
            "title": "Virtual Machines DSv2 Series",
            "description": "Dsv2-series instances are the latest generation of D-series instances that will carry more powerful CPUs which are on average about 35% faster than D-series instances, and carry the same memory and disk configurations as the D-series. Dsv2-series instances are based on the latest generation 2.4 GHz Intel Xeon® E5-2673 v3 (Haswell) processor, and with Intel Turbo Boost Technology 2.0 can go to 3.2 GHz.",
            "productType": {
                "id": "Azure",
                "displayName": "Azure",
                "subType": {
                "id": "VirtualMachines",
                "displayName": "VirtualMachines"
                }
            },
            "isMicrosoftProduct": true,
            "publisherName": "Microsoft",
            "links": {
                "skus": {
                    "uri": "/products/DZH318Z0BQ3Q/skus?country=US",
                    "method": "GET",
                    "headers": []
                },
                "self": {
                    "uri": "/products/DZH318Z0BQ3Q?country=US",
                    "method": "GET",
                    "headers": []
                }
            }
        },
        ...
    ],
    "links": {
        "self": {
            "uri": "/products?country=US&targetView=Azure",
            "method": "GET",
            "headers": []
        }
    },
    "attributes": {
        "objectType": "Collection"
    }
}

新しいコマース ライセンス ベースのサービスの応答例

Note

ライセンスベースのサービスの新しいコマース エクスペリエンスには、多くの新機能が含まれており、すべてのクラウド ソリューション プロバイダー (CSP) で利用できます。 詳細については、新しいコマース エクスペリエンスの概要を参照してください。

{
  "totalCount": 19,
  "items": [{
      "id": "CFQ7TTC0LH18",
      "title": "Microsoft 365 Business Basic",
      "description": "Best for businesses that need professional email, cloud file storage, and online meetings & chat. Desktop versions of Office apps like Excel, Word, and PowerPoint not included. For businesses with up to 300 employees.",
      "productType": {
        "id": "OnlineServicesNCE",
        "displayName": "OnlineServicesNCE"
      },
      "isMicrosoftProduct": true,
      "publisherName": "Microsoft Corporation",
      "links": {
        "skus": {
          "uri": "/products/CFQ7TTC0LH18/skus?country=US",
          "method": "GET",
          "headers": []
        },
        "self": {
          "uri": "/products/CFQ7TTC0LH18?country=US",
          "method": "GET",
          "headers": []
        }
      }
    },
    ...
  ],
  "links": {
    "self": {
      "uri": "/products?country=US&targetView=OnlineServices",
      "method": "GET",
      "headers": []
    }
  },
  "attributes": {
    "objectType": "Collection"
  }
}