aws-cloudformation / aws-cloudformation/cloudformation-cli

Support nullable primaryIdentifier property

Aperta
#643 0 commenti 1 reazione 1 assegnatario Rivendicata da @xaoyuli Vedi su GitHub
enhancement
Lingua principale
Python
Stelle
336
Fork
172
Merge medio
3g 5m
PR unite (30g)
3

Descrizione

# 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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.