共用方式為


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

Definition

Returns the unique identifier for a resource deployed at the subscription level. This represents the subscriptionResourceId Bicep function.

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

Parameters

values
BicepValue<String>[]

Optional subscription id, resource types, and resource names used to construct the resource ID. At least two values are required.

Returns

The unique identifier for a resource deployed at the subscription level.

Remarks

The identifier is returned in the following format: /subscriptions/{subscriptionId}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

You use this function to get the resource ID for resources that are deployed to the subscription rather than a resource group. The returned ID differs from the value returned by the resourceId function by not including a resource group value.

See the Bicep Functions Reference for more.

Applies to