Skip to content

Add primaryIdentifier to cfnResource trait#2539

Merged
kstich merged 1 commit intomainfrom
cfnResource_primaryIdentifier_field
Feb 26, 2025
Merged

Add primaryIdentifier to cfnResource trait#2539
kstich merged 1 commit intomainfrom
cfnResource_primaryIdentifier_field

Conversation

@kstich
Copy link
Contributor

@kstich kstich commented Feb 26, 2025

This commit adds the primaryIdentifier field to the @cfnResource trait. This supports service teams that have CFN support that deviates from their APIs in their primary identifier, normally from a human readable value to an ARN. This field is @deprecated from the start, as it is not the preferred path for supporting resource identifiers.

The value of the primaryIdentifier field, when set, MUST be the name of a property defined on the resource shape and that property MUST be defined as a string or enum shape.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@kstich kstich requested a review from a team as a code owner February 26, 2025 06:44
@kstich kstich requested a review from yefrig February 26, 2025 06:44
Copy link
Contributor

@JordonPhillips JordonPhillips left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs updates to the docs

/// An alternative resource property to use as the primary identifier
/// for the CloudFormation resource. MUST be the name of a property on
/// the resource shape that targets a string shape.
@deprecated(message: "Prefer the resource's identifiers when generating resource schemas")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@deprecated(message: "Prefer the resource's identifiers when generating resource schemas")
@deprecated(message: "Prefer the resource's identifiers when generating resource schemas.")

@kstich kstich force-pushed the cfnResource_primaryIdentifier_field branch from 7e4ff4b to e71667c Compare February 26, 2025 17:04
This commit adds the primaryIdentifier field to the cfnResource trait.
This supports service teams that have CFN support that deviates from
their APIs in their primary identifier, normally from a human readable
value to an ARN. This field is deprecated from the start, as it is not
the preferred path for supporting resource identifiers.

The value of the primaryIdentifier field, when set, MUST be the name of
a property defined on the resource shape and that property MUST be
defined as a string or enum shape.
@kstich kstich force-pushed the cfnResource_primaryIdentifier_field branch from e71667c to 030a170 Compare February 26, 2025 17:05
@kstich kstich merged commit cd780c0 into main Feb 26, 2025
8 checks passed
@kstich kstich deleted the cfnResource_primaryIdentifier_field branch February 26, 2025 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants