C# Class Microsoft.Azure.Commands.ResourceManager.Cmdlets.Components.ResourceIdUtility

Class for building and parsing resource Ids.
Afficher le fichier Open project: Azure/azure-powershell Class Usage Examples

Méthodes publiques

Méthode Description
GetExtensionProviderNamespace ( string resourceId ) : string

Gets the extension provider namespace from the resource id.

GetExtensionResourceName ( string resourceId ) : string

Gets a resource name

GetExtensionResourceType ( string resourceId, bool includeProviderNamespace = true ) : string

Gets a resource type

GetProviderNamespace ( string resourceId ) : string

Gets the provider namespace from the resource id.

GetResourceCollectionId ( System.Guid subscriptionId, string resourceGroupName, string resourceType, string extensionResourceType = null ) : string

Processes the parameters to return a valid resource collection Id.

GetResourceGroupId ( string resourceId ) : string

Gets the id of the resource group from the resource id.

GetResourceGroupName ( string resourceId ) : string

Gets the name of the resource group from the resource id.

GetResourceGroupsId ( System.Guid subscriptionId ) : string

Processes the parameters to return a valid resource Id.

GetResourceId ( System.Guid subscriptionId, string resourceGroupName, string parentResource, string resourceType, string resourceName ) : string

Processes the parameters to return a valid resource Id.

GetResourceId ( System.Guid subscriptionId, string resourceGroupName, string resourceType, string resourceName, string extensionResourceType = null, string extensionResourceName = null ) : string

Processes the parameters to return a valid resource Id.

GetResourceId ( string resourceId, string extensionResourceType, string extensionResourceName = null ) : string

Processes the parameters to return a valid resource Id.

GetResourceName ( string resourceId ) : string

Gets a resource name

GetResourceType ( string resourceId, bool includeProviderNamespace = true ) : string

Gets a resource type

GetSubscriptionId ( string resourceId ) : string

Gets the subscription id from the resource id.

Private Methods

Méthode Description
GetExtensionResourceTypeOrName ( string resourceId, bool getResourceName, bool includeProviderNamespace = true ) : string

Gets either a resource type or resource Id based on the value of the getResourceName parameter.

GetNextSegmentAfter ( string resourceId, string segmentName, bool selectLastSegment = false ) : string

Gets the next segment after the one specified in segmentName.

GetProviderFromLegacyResourceTypeString ( string legacyResourceType ) : string

Gets the provider from the resource type for the legacy resource id format.

GetResourceTypeOrName ( string resourceId, bool getResourceName, bool includeProviderNamespace = true, bool useLastSegment = false ) : string

Gets either a resource type or resource Id based on the value of the getResourceName parameter.

GetSubstringAfterSegment ( string resourceId, string segmentName, bool selectLastSegment = true ) : string

Gets a the substring after a segment.

GetTypeFromLegacyResourceTypeString ( string legacyResourceType ) : string

Gets the resource type from the resource type for the legacy resource id format.

IsExtensionResourceId ( string resourceId ) : bool

Checks whether a resource id contains an extension resource.

ProcessResourceTypeAndName ( string resourceType, string resourceName ) : string

Processes a resource type string and a resource name string and

Method Details

GetExtensionProviderNamespace() public static méthode

Gets the extension provider namespace from the resource id.
public static GetExtensionProviderNamespace ( string resourceId ) : string
resourceId string The resource id.
Résultat string

GetExtensionResourceName() public static méthode

Gets a resource name
public static GetExtensionResourceName ( string resourceId ) : string
resourceId string The resource Id.
Résultat string

GetExtensionResourceType() public static méthode

Gets a resource type
public static GetExtensionResourceType ( string resourceId, bool includeProviderNamespace = true ) : string
resourceId string The resource Id.
includeProviderNamespace bool Indicates if the provider namespace should be included in the resource name.
Résultat string

GetProviderNamespace() public static méthode

Gets the provider namespace from the resource id.
public static GetProviderNamespace ( string resourceId ) : string
resourceId string The resource id.
Résultat string

GetResourceCollectionId() public static méthode

Processes the parameters to return a valid resource collection Id.
public static GetResourceCollectionId ( System.Guid subscriptionId, string resourceGroupName, string resourceType, string extensionResourceType = null ) : string
subscriptionId System.Guid The subscription.
resourceGroupName string The resource group
resourceType string The resource type string in the format: '{providerName}/{typeName}/{nestedTypeName}'
extensionResourceType string The extension resource type string in the format: '{providerName}/{typeName}/{nestedTypeName}'
Résultat string

GetResourceGroupId() public static méthode

Gets the id of the resource group from the resource id.
public static GetResourceGroupId ( string resourceId ) : string
resourceId string The resource id.
Résultat string

GetResourceGroupName() public static méthode

Gets the name of the resource group from the resource id.
public static GetResourceGroupName ( string resourceId ) : string
resourceId string The resource id.
Résultat string

GetResourceGroupsId() public static méthode

Processes the parameters to return a valid resource Id.
public static GetResourceGroupsId ( System.Guid subscriptionId ) : string
subscriptionId System.Guid The subscription.
Résultat string

GetResourceId() public static méthode

Processes the parameters to return a valid resource Id.
public static GetResourceId ( System.Guid subscriptionId, string resourceGroupName, string parentResource, string resourceType, string resourceName ) : string
subscriptionId System.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}'
Résultat string

GetResourceId() public static méthode

Processes the parameters to return a valid resource Id.
public static GetResourceId ( System.Guid subscriptionId, string resourceGroupName, string resourceType, string resourceName, string extensionResourceType = null, string extensionResourceName = null ) : string
subscriptionId System.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}]'
Résultat string

GetResourceId() public static méthode

Processes the parameters to return a valid resource Id.
public static GetResourceId ( string resourceId, string extensionResourceType, string extensionResourceName = null ) : string
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}]'
Résultat string

GetResourceName() public static méthode

Gets a resource name
public static GetResourceName ( string resourceId ) : string
resourceId string The resource Id.
Résultat string

GetResourceType() public static méthode

Gets a resource type
public static GetResourceType ( string resourceId, bool includeProviderNamespace = true ) : string
resourceId string The resource Id.
includeProviderNamespace bool Indicates if the provider namespace should be included in the resource name.
Résultat string

GetSubscriptionId() public static méthode

Gets the subscription id from the resource id.
public static GetSubscriptionId ( string resourceId ) : string
resourceId string The resource id.
Résultat string