All Products
Search
Document Center

Resource Orchestration Service:resource kustom

Last Updated:Mar 17, 2026

Nilai AssociationProperty

Deskripsi

AssociationPropertyMetadata yang Sesuai

ALIYUN::Resource::Data::API

Digunakan oleh OpenAPI Produk Alibaba Cloud untuk mengkueri data berdasarkan parameter.

  • APIAction: Informasi Produk Cloud dan API Produk Cloud.

  • OptionsGetter: Menentukan pola penguraian lapisan data.

  • ValueGetter: Menentukan nama properti yang diurai.

  • LabelGetter: Menentukan properti yang ditampilkan untuk hasil kueri di halaman.

  • PageFilterKeys: Properti filter penomoran halaman.

    • PageSize: Ukuran halaman.

    • PageNumber: Nomor halaman.

    • TotalCount: Jumlah total.

Contoh:

  • Kode contoh

    Contoh JSON:

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "PolicyClasses": {
          "Type": "String",
          "AssociationProperty": "ALIYUN::Resource::Data::API",
          "AssociationPropertyMetadata": {
            "APIAction": "APIG/ListPolicyClasses",
            "OptionsGetter": "data.items",
            "ValueGetter": "classId",
            "LabelGetter": "name",
            "PageFilterKeys": {
              "PageSize": "pageSize",
              "PageNumber": "pageNumber",
              "TotalCount": "totalSize",
            }
          }
        }
      }
    }

    Contoh YAML:

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      PolicyClasses:
        Type: String
        AssociationProperty: ALIYUN::Resource::Data::API
        AssociationPropertyMetadata:
          APIAction: APIG/ListPolicyClasses
          OptionsGetter: data.items
          ValueGetter: classId
          LabelGetter: name
          PageFilterKeys:
            PageSize: pageSize
            PageNumber: pageNumber
            TotalCount: totalSize
    
    
  • Penjelasan contoh

    Pada contoh ini, Anda memanggil API ListPolicyClasses - Dapatkan templat kebijakan dari Gerbang API (APIG) cloud-native untuk mengkueri ID templat kebijakan (classId) dan menampilkan nama templat kebijakan tersebut. Hal ini dilakukan dengan mengatur properti AssociationProperty parameter PolicyClasses menjadi ALIYUN::Resource::Data::API serta properti AssociationPropertyMetadata menjadi APIAction, OptionsGetter, ValueGetter, LabelGetter, dan PageFilterKeys.