public Map<String, ConditionKeyDefinition> getDefinedConditionKeys(
            ToShapeId service,
            ToShapeId resourceOrOperation
    ) {
        Map<String, ConditionKeyDefinition> serviceDefinitions = getDefinedConditionKeys(service);
        Map<String, ConditionKeyDefinition> definitions = new HashMap<>();

        for (String name : getConditionKeyNames(service, resourceOrOperation)) {
            if (serviceDefinitions.containsKey(name)) {
                definitions.put(name, serviceDefinitions.get(name));
            }
        }

        return definitions;
    }
Get all the defined condition keys used in an operation or resource, including
any inferred keys and keys inherited by parent resource bindings.

<p>The result does not include global condition keys like "aws:accountId".
Use {@link #getConditionKeyNames} to find all the condition keys used
but not necessarily defined for a resource or operation.

@param service Service shape/shapeId use to scope the result.
@param resourceOrOperation Resource or operation shape/shapeId
@return Returns the conditions keys of the service or an empty map when not found.
smithy-aws-iam-traits/src/main/java/software/amazon/smithy/aws/iam/traits/ConditionKeysIndex.java