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
Copy file name to clipboardExpand all lines: articles/azure-resource-manager/bicep/data-types.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
@@ -66,7 +66,7 @@ var index = 1
66
66
output secondElement int = exampleArray[index] // 2
67
67
```
68
68
69
-
Starting with [Bicep CLI version 0.34.x](https://github.com/Azure/bicep/releases/tag/v0.34.1), you can use the `array[^index]` syntax to access elements from the end of an array —`^1` refers to the last element, `^2` to the second-to-last, and so on.
69
+
Starting with [Bicep CLI version 0.34.x](https://github.com/Azure/bicep/releases/tag/v0.34.1), you can use the `array[^index]` syntax to access elements from the end of an array -`^1` refers to the last element, `^2` to the second-to-last, and so on.
`resourceOutput<>`: Represents the readable properties of a resource type, stripping away any properties marked as WriteOnly in the ARM template schema. It matches the type of value returned after the resource is provisioned.
432
432
433
-
You can apply `resourceInput<>` or `resourceOutput<>` to extract only a part of a resource schema. For example, to strongly type a variable or parameter based on just the `kind` or `properties` of a storage account:
433
+
You can apply `resourceInput<>` or `resourceOutput<>` to extract only a part of a resource schema. For example, to type a variable or parameter based on just the `kind` or `properties` of a storage account:
434
434
435
435
```bicep
436
436
type accountKind = resourceInput<'Microsoft.Storage/storageAccounts@2024-01-01'>.kind
@@ -442,18 +442,18 @@ The preceding example is equivalent to:
The following example shows how to use `resourceInput<>` to create a strongly typed parameter based on the `properties` of a storage account resource. This allows you to define a parameter that matches the writable properties of a storage account, such as `accessTier`, `minimumTlsVersion`, and others:
445
+
The following example shows how to use `resourceInput<>` to create a typed parameter based on the `properties` of a storage account resource. This allows you to define a parameter that matches the writable properties of a storage account, such as `accessTier`, `minimumTlsVersion`, and others:
446
446
447
447
```bicep
448
-
// Strongly typed variable using the .properties path of a storage account
448
+
// Typed parameter using the .properties path of a storage account
The following example shows how to use `resourceOutput<>` to create a strongly typed output based on the `primaryEndPoints` of a storage account resource.
468
+
The following example shows how to use `resourceOutput<>` to create a typed output based on the `primaryEndPoints` of a storage account resource.
0 commit comments