Enum AzureCredentialType
- java.lang.Object
-
- java.lang.Enum<AzureCredentialType>
-
- com.microsoft.semantickernel.connectors.ai.openai.util.AzureCredentialType
-
- All Implemented Interfaces:
Serializable,Comparable<AzureCredentialType>
public enum AzureCredentialType extends Enum<AzureCredentialType>
Defines the type of azure credential used for authenticating to this resource
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AZURE_CLIKEYMANAGED_IDENTITY
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static com.azure.core.credential.TokenCredentialgetCredential()Create a TokenCredential instance, uses the default settings locations (seeSettingsMapfor details).static com.azure.core.credential.TokenCredentialgetCredential(List<File> propertyFileLocations)Create a TokenCredential instance, uses the provided settings locations (seeSettingsMapfor details).abstract com.azure.core.credential.TokenCredentialgetTokenCredential()Create a TokenCredential instance.static AzureCredentialTypevalueOf(String name)Returns the enum constant of this type with the specified name.static AzureCredentialType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
KEY
public static final AzureCredentialType KEY
-
MANAGED_IDENTITY
public static final AzureCredentialType MANAGED_IDENTITY
-
AZURE_CLI
public static final AzureCredentialType AZURE_CLI
-
-
Method Detail
-
values
public static AzureCredentialType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AzureCredentialType c : AzureCredentialType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AzureCredentialType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getTokenCredential
@Nullable public abstract com.azure.core.credential.TokenCredential getTokenCredential()
Create a TokenCredential instance.- Returns:
- TokenCredential instance or null if not found
-
getCredential
@Nullable public static com.azure.core.credential.TokenCredential getCredential() throws ConfigurationException
Create a TokenCredential instance, uses the default settings locations (seeSettingsMapfor details).Set the 'client.azureopenai.credentialtype' environment variable within settings to determine the token type.
AzureCredentialType- Returns:
- TokenCredential instance or null if not found
- Throws:
ConfigurationException
-
getCredential
@Nullable public static com.azure.core.credential.TokenCredential getCredential(@Nullable List<File> propertyFileLocations) throws ConfigurationException
Create a TokenCredential instance, uses the provided settings locations (seeSettingsMapfor details).Set the 'client.azureopenai.credentialtype' environment variable within settings to determine the token type.
AzureCredentialType- Returns:
- TokenCredential instance or null if not found
- Throws:
ConfigurationException
-
-