Compartilhar via


ResourceIdUtility.GetResourceId Method

Definition

Overloads

GetResourceId(String, String, String)

Processes the parameters to return a valid resource Id.

GetResourceId(Guid, String, String, String, String)

Processes the parameters to return a valid resource Id.

GetResourceId(Nullable<Guid>, String, String, String, String, String)

Processes the parameters to return a valid resource Id.

GetResourceId(String, String, String)

Processes the parameters to return a valid resource Id.

public static string GetResourceId (string resourceId, string extensionResourceType, string extensionResourceName = default);
static member GetResourceId : string * string * string -> string
Public Shared Function GetResourceId (resourceId As String, extensionResourceType As String, Optional extensionResourceName As String = Nothing) As String

Parameters

resourceId
String

The resource Id.

extensionResourceType
String

The extension resource type string in the format: '{providerName}/{typeName}/{nestedTypeName}'

extensionResourceName
String

The extension resource name in the format: '{resourceName}[/{nestedResourceName}]'

Returns

Applies to

GetResourceId(Guid, String, String, String, String)

Processes the parameters to return a valid resource Id.

public static string GetResourceId (Guid subscriptionId, string resourceGroupName, string parentResource, string resourceType, string resourceName);
static member GetResourceId : Guid * string * string * string * string -> string
Public Shared Function GetResourceId (subscriptionId As Guid, resourceGroupName As String, parentResource As String, resourceType As String, resourceName As String) As String

Parameters

subscriptionId
Guid

The subscription.

resourceGroupName
String

The resource group

parentResource
String

The parent resource in the format: '{resourceType}/{typeName}'

resourceType
String

The resource type string in the format: '{providerName}/{typeName}'

resourceName
String

The resource name in the format: '{resourceName}'

Returns

Applies to

GetResourceId(Nullable<Guid>, String, String, String, String, String)

Processes the parameters to return a valid resource Id.

public static string GetResourceId (Guid? subscriptionId, string resourceGroupName, string resourceType, string resourceName, string extensionResourceType = default, string extensionResourceName = default);
static member GetResourceId : Nullable<Guid> * string * string * string * string * string -> string
Public Shared Function GetResourceId (subscriptionId As Nullable(Of Guid), resourceGroupName As String, resourceType As String, resourceName As String, Optional extensionResourceType As String = Nothing, Optional extensionResourceName As String = Nothing) As String

Parameters

subscriptionId
Nullable<Guid>

The subscription.

resourceGroupName
String

The resource group

resourceType
String

The resource type string in the format: '{providerName}/{typeName}/{nestedTypeName}'

resourceName
String

The resource name in the format: '{resourceName}[/{nestedResourceName}]'

extensionResourceType
String

The extension resource type string in the format: '{providerName}/{typeName}/{nestedTypeName}'

extensionResourceName
String

The extension resource name in the format: '{resourceName}[/{nestedResourceName}]'

Returns

Applies to