ResourceManagerUtils Class
- java.
lang. Object - com.
azure. resourcemanager. resources. fluentcore. utils. ResourceManagerUtils
- com.
public final class ResourceManagerUtils
Defines a few utilities.
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| static String |
createOdataFilterForTags(String tagName, String tagValue)
Creates an Odata filter string that can be used for filtering list results by tags. |
| static String |
getDefaultScopeFromRequest(HttpRequest request, AzureEnvironment environment)
Generates default scope for oauth2 from the specific request |
| static String |
getDefaultSubscription(PagedIterable<Subscription> subscriptions)
Gets the only subscription as the default one in the tenant if applicable. |
| static String |
getStorageConnectionString(String accountName, String accountKey, AzureEnvironment environment)
Get the Azure storage account connection string. |
| static void |
sleep(Duration duration)
Wrapper for thread sleep. |
| static boolean |
toPrimitiveBoolean(Boolean value)
Converts an object Boolean to a primitive boolean. |
| static int |
toPrimitiveInt(Integer value)
Converts an object Integer to a primitive int. |
| static int |
toPrimitiveInt(Long value)
Converts an object Long to a primitive int. |
| static long |
toPrimitiveLong(Long value)
Converts an object Long to a primitive long. |
Methods inherited from java.lang.Object
Method Details
createOdataFilterForTags
public static String createOdataFilterForTags(String tagName, String tagValue)
Creates an Odata filter string that can be used for filtering list results by tags.
Parameters:
Returns:
getDefaultScopeFromRequest
public static String getDefaultScopeFromRequest(HttpRequest request, AzureEnvironment environment)
Generates default scope for oauth2 from the specific request
Parameters:
Returns:
getDefaultSubscription
public static String getDefaultSubscription(PagedIterable<Subscription> subscriptions)
Gets the only subscription as the default one in the tenant if applicable.
Parameters:
Returns:
getStorageConnectionString
public static String getStorageConnectionString(String accountName, String accountKey, AzureEnvironment environment)
Get the Azure storage account connection string.
Parameters:
Returns:
sleep
public static void sleep(Duration duration)
Wrapper for thread sleep.
Parameters:
toPrimitiveBoolean
public static boolean toPrimitiveBoolean(Boolean value)
Converts an object Boolean to a primitive boolean.
Parameters:
Returns:
toPrimitiveInt
public static int toPrimitiveInt(Integer value)
Converts an object Integer to a primitive int.
Parameters:
Returns:
toPrimitiveInt
public static int toPrimitiveInt(Long value)
Converts an object Long to a primitive int.
Parameters:
Returns:
toPrimitiveLong
public static long toPrimitiveLong(Long value)
Converts an object Long to a primitive long.
Parameters:
Returns: