Class ApiKeyAuthWorkspaceConnectionProperties
java.lang.Object
com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2
com.azure.resourcemanager.machinelearning.models.ApiKeyAuthWorkspaceConnectionProperties
- All Implemented Interfaces:
com.azure.json.JsonSerializable<WorkspaceConnectionPropertiesV2>
This connection type covers the generic ApiKey auth connection categories, for examples:
AzureOpenAI:
Category:= AzureOpenAI
AuthType:= ApiKey (as type discriminator)
Credentials:= {ApiKey} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey
Target:= {ApiBase}
CognitiveService:
Category:= CognitiveService
AuthType:= ApiKey (as type discriminator)
Credentials:= {SubscriptionKey} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey
Target:= ServiceRegion={serviceRegion}
CognitiveSearch:
Category:= CognitiveSearch
AuthType:= ApiKey (as type discriminator)
Credentials:= {Key} as Microsoft.MachineLearning.AccountRP.Contracts.WorkspaceConnection.ApiKey
Target:= {Endpoint}
Use Metadata property bag for ApiType, ApiVersion, Kind and other metadata fields.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ApiKeyAuthWorkspaceConnectionProperties class. -
Method Summary
Modifier and TypeMethodDescriptionauthType()Get the authType property: Authentication type of the connection target.Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property.Get the credentials property: Api key object for workspace connection credential.fromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ApiKeyAuthWorkspaceConnectionProperties from the JsonReader.group()Get the group property: Group based on connection category.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withCategory(ConnectionCategory category) Set the category property: Category of the connection.withCredentials(WorkspaceConnectionApiKey credentials) Set the credentials property: Api key object for workspace connection credential.withExpiryTime(OffsetDateTime expiryTime) Set the expiryTime property: The expiryTime property.withIsSharedToAll(Boolean isSharedToAll) Set the isSharedToAll property: The isSharedToAll property.withMetadata(Map<String, String> metadata) Set the metadata property: Store user metadata for this connection.withSharedUserList(List<String> sharedUserList) Set the sharedUserList property: The sharedUserList property.withTarget(String target) Set the target property: The target property.Set the value property: Value details of the workspace connection.withValueFormat(ValueFormat valueFormat) Set the valueFormat property: format for the workspace connection value.Methods inherited from class com.azure.resourcemanager.machinelearning.models.WorkspaceConnectionPropertiesV2
category, expiryTime, isSharedToAll, metadata, sharedUserList, target, value, valueFormatMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ApiKeyAuthWorkspaceConnectionProperties
public ApiKeyAuthWorkspaceConnectionProperties()Creates an instance of ApiKeyAuthWorkspaceConnectionProperties class.
-
-
Method Details
-
authType
Get the authType property: Authentication type of the connection target.- Overrides:
authTypein classWorkspaceConnectionPropertiesV2- Returns:
- the authType value.
-
credentials
Get the credentials property: Api key object for workspace connection credential.- Returns:
- the credentials value.
-
withCredentials
public ApiKeyAuthWorkspaceConnectionProperties withCredentials(WorkspaceConnectionApiKey credentials) Set the credentials property: Api key object for workspace connection credential.- Parameters:
credentials- the credentials value to set.- Returns:
- the ApiKeyAuthWorkspaceConnectionProperties object itself.
-
createdByWorkspaceArmId
Get the createdByWorkspaceArmId property: The createdByWorkspaceArmId property.- Overrides:
createdByWorkspaceArmIdin classWorkspaceConnectionPropertiesV2- Returns:
- the createdByWorkspaceArmId value.
-
group
Get the group property: Group based on connection category.- Overrides:
groupin classWorkspaceConnectionPropertiesV2- Returns:
- the group value.
-
withCategory
Set the category property: Category of the connection.- Overrides:
withCategoryin classWorkspaceConnectionPropertiesV2- Parameters:
category- the category value to set.- Returns:
- the WorkspaceConnectionPropertiesV2 object itself.
-
withExpiryTime
Set the expiryTime property: The expiryTime property.- Overrides:
withExpiryTimein classWorkspaceConnectionPropertiesV2- Parameters:
expiryTime- the expiryTime value to set.- Returns:
- the WorkspaceConnectionPropertiesV2 object itself.
-
withTarget
Set the target property: The target property.- Overrides:
withTargetin classWorkspaceConnectionPropertiesV2- Parameters:
target- the target value to set.- Returns:
- the WorkspaceConnectionPropertiesV2 object itself.
-
withMetadata
Set the metadata property: Store user metadata for this connection.- Overrides:
withMetadatain classWorkspaceConnectionPropertiesV2- Parameters:
metadata- the metadata value to set.- Returns:
- the WorkspaceConnectionPropertiesV2 object itself.
-
withValue
Set the value property: Value details of the workspace connection.- Overrides:
withValuein classWorkspaceConnectionPropertiesV2- Parameters:
value- the value value to set.- Returns:
- the WorkspaceConnectionPropertiesV2 object itself.
-
withValueFormat
Set the valueFormat property: format for the workspace connection value.- Overrides:
withValueFormatin classWorkspaceConnectionPropertiesV2- Parameters:
valueFormat- the valueFormat value to set.- Returns:
- the WorkspaceConnectionPropertiesV2 object itself.
-
validate
public void validate()Validates the instance.- Overrides:
validatein classWorkspaceConnectionPropertiesV2- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<WorkspaceConnectionPropertiesV2>- Overrides:
toJsonin classWorkspaceConnectionPropertiesV2- Throws:
IOException
-
fromJson
public static ApiKeyAuthWorkspaceConnectionProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ApiKeyAuthWorkspaceConnectionProperties from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ApiKeyAuthWorkspaceConnectionProperties if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the ApiKeyAuthWorkspaceConnectionProperties.
-