ResourceIdentifierExtensions.GetParentResourceName Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Get the parent resource name starting from level 0, immediate parent
public static string GetParentResourceName (this Microsoft.Azure.Management.Internal.Resources.Utilities.Models.ResourceIdentifier resourceIdentifier, string resourceType, int level = 0);
static member GetParentResourceName : Microsoft.Azure.Management.Internal.Resources.Utilities.Models.ResourceIdentifier * string * int -> string
<Extension()>
Public Function GetParentResourceName (resourceIdentifier As ResourceIdentifier, resourceType As String, Optional level As Integer = 0) As String
Parameters
- resourceIdentifier
- ResourceIdentifier
The resource identifier.
- resourceType
- String
Type of the resource.
- level
- Int32
The level.
Returns
System.String.
Exceptions
Invalid argument {nameof(resourceIdentifier.ParentResource)} - ParentResource or Invalid argument {nameof(level)} - level or Invalid argument {nameof(resourceType)} - resourceType