共用方式為


BicepFunction.CreateGuid(BicepValue<String>[]) Method

Definition

Creates a value in the format of a globally unique identifier based on the values provided as parameters. This represents the guid Bicep function.

public static Azure.Provisioning.BicepValue<string> CreateGuid (params Azure.Provisioning.BicepValue<string>[] values);
static member CreateGuid : Azure.Provisioning.BicepValue<string>[] -> Azure.Provisioning.BicepValue<string>
Public Shared Function CreateGuid (ParamArray values As BicepValue(Of String)()) As BicepValue(Of String)

Parameters

values
BicepValue<String>[]

The value used in the hash function to create the GUID. At least one value is required.

Returns

A string containing 36 characters in the format of a globally unique identifier.

Remarks

This function is helpful when you need to create a value in the format of a globally unique identifier. You provide parameter values that limit the scope of uniqueness for the result. You can specify whether the name is unique down to subscription, resource group, or deployment.

The returned value isn't a random string, but rather the result of a hash function on the parameters. The returned value is 36 characters long. It isn't globally unique.

NOTE: The order of the parameters affects the returned value. For example, CreateGuid("Hello", "World") and CreateGuid("World", "Hello") don't return the same value.

See the Bicep Functions Reference for more.

Applies to