You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Decorators are written in the format `@expression` and are placed above the declarations of the user-defined data type. The following table shows the available decorators for user-defined data types.
234
234
235
-
| Decorator | Argument | Description |
235
+
| Decorator |Apply to |Argument | Description |
236
236
| --------- | ----------- | ------- |
237
-
|[description](#description)| string | Provide descriptions for the user-defined data type. |
238
-
|[discriminator](#discriminator)| string | Use this decorator to ensure the correct subclass is identified and managed. |
239
-
|[export](#export)| none | Indicates that the user-defined data type is available for import by another Bicep file. |
237
+
|[description](#description)|all |string | Provide descriptions for the user-defined data type. |
238
+
|[discriminator](#discriminator)|object |string | Use this decorator to ensure the correct subclass is identified and managed. |
239
+
|[export](#export)|all |none | Indicates that the user-defined data type is available for import by another Bicep file. |
240
240
|[maxLength](#length-constraints)| array, string | int | The maximum length for string and array data types. The value is inclusive. |
241
241
|[maxValue](#integer-constraints)| int | int | The maximum value for the integer data types. This value is inclusive. |
242
242
|[metadata](#metadata)| all | object | Custom properties to apply to the data types. Can include a description property that is equivalent to the description decorator. |
243
243
|[minLength](#length-constraints)| array, string | int | The minimum length for string and array data types. The value is inclusive. |
244
244
|[minValue](#integer-constraints)| int | int | The minimum value for the integer data types. This value is inclusive. |
245
-
|[sealed](#sealed)| none | Elevate [BCP089](./diagnostics/bcp089.md) from a warning to an error when a property name of a use-define data type is likely a typo. For more information, see [Elevate error level](#elevate-error-level).|
246
-
|[secure](#secure-parameters)| string, object | none | Marks the types as secure. The value for a secure type isn't saved to the deployment history and isn't logged. For more information, see [Secure strings and objects](data-types.md#secure-strings-and-objects). |
245
+
|[sealed](#sealed)|object |none | Elevate [BCP089](./diagnostics/bcp089.md) from a warning to an error when a property name of a use-define data type is likely a typo. For more information, see [Elevate error level](#elevate-error-level).|
246
+
|[secure](#secure-types)| string, object | none | Marks the types as secure. The value for a secure type isn't saved to the deployment history and isn't logged. For more information, see [Secure strings and objects](data-types.md#secure-strings-and-objects). |
247
247
248
248
Decorators are in the [sys namespace](bicep-functions.md#namespaces-for-functions). If you need to differentiate a decorator from another item with the same name, preface the decorator with `sys`. For example, if your Bicep file includes a variable named `description`, you must add the sys namespace when using the **description** decorator.
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/bicep/user-defined-functions.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -110,7 +110,7 @@ Decorators are written in the format `@expression` and are placed above function
110
110
| --------- | ----------- | ------- |
111
111
|[description](#description)| string | Provide descriptions for the function. |
112
112
|[export](#export)| none | Indicates that the function is available for import by another Bicep file. |
113
-
|[metadata](#metadata)|all |object | Custom properties to apply to the function. Can include a description property that is equivalent to the description decorator. |
113
+
|[metadata](#metadata)| object | Custom properties to apply to the function. Can include a description property that is equivalent to the description decorator. |
114
114
115
115
Decorators are in the [sys namespace](bicep-functions.md#namespaces-for-functions). If you need to differentiate a decorator from another item with the same name, preface the decorator with `sys`. For example, if your Bicep file includes a variable named `description`, you must add the sys namespace when using the **description** decorator.
0 commit comments