Package eu.cloudhopper.mc.annotations
Annotation Interface Extension
Declares a vendor-specific or custom extension attribute for a
Function.
This annotation can be used to specify additional deployment metadata that
is not covered by the standard Function attributes. Predefined keys
are available as constants in ExtensionKeys, for example
ExtensionKeys.Aws.Architecture.KEY ("x-aws-architecture").
This annotation is repeatable
via the Extensions container annotation and is only retained in source
code for processing during code generation.
Example usage:
@Function(
name = "hello",
extensions = {
@Extension(
name = ExtensionKeys.Aws.Architecture.KEY,
value = ExtensionKeys.Aws.Architecture.Values.ARM64)
}
)
- See Also:
-
Required Element Summary
Required Elements
-
Element Details
-
name
String nameThe name of the extension attribute.Vendor-specific keys follow the OpenAPI
x-prefix convention, e.g."x-aws-architecture". Prefer the constants inExtensionKeysover string literals where one exists.- Returns:
- the attribute name
-
value
String valueThe value associated with the extension attribute.Interpretation depends on the attribute name, e.g.
"arm64"forExtensionKeys.Aws.Architecture.KEY.- Returns:
- the attribute value
-