Partager via


DataPlaneAuthOptions Class

  • java.lang.Object
    • com.azure.resourcemanager.search.models.DataPlaneAuthOptions

Implements

public final class DataPlaneAuthOptions
implements JsonSerializable<DataPlaneAuthOptions>

Defines the options for how the search service authenticates a data plane request. This cannot be set if 'disableLocalAuth' is set to true.

Constructor Summary

Constructor Description
DataPlaneAuthOptions()

Creates an instance of DataPlaneAuthOptions class.

Method Summary

Modifier and Type Method and Description
DataPlaneAadOrApiKeyAuthOption aadOrApiKey()

Get the aadOrApiKey property: Indicates that either the API key or an access token from a Microsoft Entra ID tenant can be used for authentication.

Object apiKeyOnly()

Get the apiKeyOnly property: Indicates that only the API key can be used for authentication.

static DataPlaneAuthOptions fromJson(JsonReader jsonReader)

Reads an instance of DataPlaneAuthOptions from the JsonReader.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

DataPlaneAuthOptions withAadOrApiKey(DataPlaneAadOrApiKeyAuthOption aadOrApiKey)

Set the aadOrApiKey property: Indicates that either the API key or an access token from a Microsoft Entra ID tenant can be used for authentication.

DataPlaneAuthOptions withApiKeyOnly(Object apiKeyOnly)

Set the apiKeyOnly property: Indicates that only the API key can be used for authentication.

Methods inherited from java.lang.Object

Constructor Details

DataPlaneAuthOptions

public DataPlaneAuthOptions()

Creates an instance of DataPlaneAuthOptions class.

Method Details

aadOrApiKey

public DataPlaneAadOrApiKeyAuthOption aadOrApiKey()

Get the aadOrApiKey property: Indicates that either the API key or an access token from a Microsoft Entra ID tenant can be used for authentication.

Returns:

the aadOrApiKey value.

apiKeyOnly

public Object apiKeyOnly()

Get the apiKeyOnly property: Indicates that only the API key can be used for authentication.

Returns:

the apiKeyOnly value.

fromJson

public static DataPlaneAuthOptions fromJson(JsonReader jsonReader)

Reads an instance of DataPlaneAuthOptions from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of DataPlaneAuthOptions 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 DataPlaneAuthOptions.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withAadOrApiKey

public DataPlaneAuthOptions withAadOrApiKey(DataPlaneAadOrApiKeyAuthOption aadOrApiKey)

Set the aadOrApiKey property: Indicates that either the API key or an access token from a Microsoft Entra ID tenant can be used for authentication.

Parameters:

aadOrApiKey - the aadOrApiKey value to set.

Returns:

the DataPlaneAuthOptions object itself.

withApiKeyOnly

public DataPlaneAuthOptions withApiKeyOnly(Object apiKeyOnly)

Set the apiKeyOnly property: Indicates that only the API key can be used for authentication.

Parameters:

apiKeyOnly - the apiKeyOnly value to set.

Returns:

the DataPlaneAuthOptions object itself.

Applies to