public class ResourceUtilsCore extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
ResourceUtilsCore() |
| Modifier and Type | Method and Description |
|---|---|
static String |
constructResourceId(String subscriptionId,
String resourceGroupName,
String resourceProviderNamespace,
String resourceType,
String resourceName,
String parentResourcePath)
Creates a resource ID from information of a generic resource.
|
static String |
extractFromResourceId(String id,
String identifier)
Extract information from a resource ID string with the resource type
as the identifier.
|
static String |
groupFromResourceId(String id)
Extract resource group from a resource ID string.
|
static String |
nameFromResourceId(String id)
Extract name of the resource from a resource ID.
|
static String |
parentRelativePathFromResourceId(String id)
Extract parent resource path from a resource ID string.
|
static String |
parentResourceIdFromResourceId(String id)
Extract parent resource ID from a resource ID string.
|
static String |
relativePathFromResourceId(String id)
Extract the relative path to the current resource provider.
|
static String |
resourceProviderFromResourceId(String id)
Extract resource provider from a resource ID string.
|
static String |
resourceTypeFromResourceId(String id)
Extract resource type from a resource ID string.
|
static String |
subscriptionFromResourceId(String id)
Extract the subscription ID from a resource ID string.
|
public static String groupFromResourceId(String id)
id - the resource ID stringpublic static String subscriptionFromResourceId(String id)
id - the resource ID stringpublic static String resourceProviderFromResourceId(String id)
id - the resource ID stringpublic static String resourceTypeFromResourceId(String id)
id - the resource ID stringpublic static String parentResourceIdFromResourceId(String id)
id - the resource ID stringpublic static String parentRelativePathFromResourceId(String id)
id - the resource ID stringpublic static String relativePathFromResourceId(String id)
id - the id of the resourcepublic static String extractFromResourceId(String id, String identifier)
id - the resource IDidentifier - the identifier to match, e.g. "resourceGroups", "storageAccounts"public static String nameFromResourceId(String id)
id - the resource IDpublic static String constructResourceId(String subscriptionId, String resourceGroupName, String resourceProviderNamespace, String resourceType, String resourceName, String parentResourcePath)
subscriptionId - the subscription UUIDresourceGroupName - the resource group nameresourceProviderNamespace - the resource provider namespaceresourceType - the type of the resource or nested resourceresourceName - name of the resource or nested resourceparentResourcePath - parent resource's relative path to the provider,
if the resource is a generic resource/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/