aws-cloudformation / aws-cloudformation/cloudformation-cli

Support nullable primaryIdentifier property

オープン
#643 コメント 0 件 リアクション 1 件 担当者 1 名 @xaoyuli が担当を希望しています GitHub で見る
enhancement
主要言語
Python
スター
337
フォーク
172
平均マージ
3日 5分
マージ済み PR(30日)
3

説明

# Description
Customer can use a list of property to define the primaryIdentifier. Customer uluru schema example:
```
"primaryIdentifier":[
"/properties/Name"
"/properties/Type"
"/properties/Id"
]
```

In our current platform, Customer need to provide value to all the identifier property like below now:
```
Properties:
Name: Name_A
Type: Type_A
Id: Id_A
```
We plan to support nullable physical id property and nullable primaryIdentifier property. We plan to support customer using following template.
```
Properties:
Name: Name_A
Id: Id_A
```
This resource will have.a primaryId: Name_A||Id_A
This feature should be supported in RPDK.

# Exit Criteria:

1. add following contract test validation:

a. Verify property in identifierProperties should be either ReadOnlyProperty or CreateOnlyProperty.
b. Verify the model returned by create/read handler must include all the ReadOnlyProperties.
This is because identifierProperties consist of ReadOnlyProperty and CreateOnlyProperty. Only CreateOnlyProperty can be nullable. If model returned from create/read handler includes all the ReadOnlyProperties, it can make sure ReadOnlyProperties are not null.
2. Change the contract test assertion
``assert_primary_identifier`` and ``is_primary_identifier_equal`` should allow nullable primaryIdentifier properties
3. RPDK generated resource Model, should be able to create the nullable property identifier. Now it will return null primaryIdentifier when any of the primaryIdentifier property is null

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。