private void setIdentifierMutabilities(
            CfnResource.Builder builder,
            ResourceShape resource,
            Set<ResourceShape> parentResources
    ) {
        Set<Mutability> defaultIdentifierMutability = getDefaultIdentifierMutabilities(resource);

        resource.getIdentifiers().forEach((name, shape) -> {
            builder.putPropertyDefinition(name,
                    CfnResourceProperty.builder()
                            .hasExplicitMutability(true)
                            .mutabilities(identifierIsInherited(name, parentResources)
                                    ? INHERITED_MUTABILITY
                                    : defaultIdentifierMutability)
                            .addShapeId(shape)
                            .build());
        });
    }
Gets the definition of the specified CloudFormation resource.

@param resource ShapeID of a resource
@return The resource definition.
smithy-aws-cloudformation-traits/src/main/java/software/amazon/smithy/aws/cloudformation/traits/CfnResourceIndex.java