CustomRegistryCredentials Class
- java.
lang. Object - com.
azure. resourcemanager. containerregistry. models. CustomRegistryCredentials
- com.
Implements
public final class CustomRegistryCredentials
implements JsonSerializable<CustomRegistryCredentials>
Describes the credentials that will be used to access a custom registry during a run.
Constructor Summary
Constructor | Description |
---|---|
CustomRegistryCredentials() |
Creates an instance of Custom |
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Custom |
fromJson(JsonReader jsonReader)
Reads an instance of Custom |
String |
identity()
Get the identity property: Indicates the managed identity assigned to the custom credential. |
Secret |
password()
Get the password property: The password for logging into the custom registry. |
Json |
toJson(JsonWriter jsonWriter) |
Secret |
username()
Get the username property: The username for logging into the custom registry. |
void |
validate()
Validates the instance. |
Custom |
withIdentity(String identity)
Set the identity property: Indicates the managed identity assigned to the custom credential. |
Custom |
withPassword(SecretObject password)
Set the password property: The password for logging into the custom registry. |
Custom |
withUsername(SecretObject username)
Set the username property: The username for logging into the custom registry. |
Methods inherited from java.lang.Object
Constructor Details
CustomRegistryCredentials
public CustomRegistryCredentials()
Creates an instance of CustomRegistryCredentials class.
Method Details
fromJson
public static CustomRegistryCredentials fromJson(JsonReader jsonReader)
Reads an instance of CustomRegistryCredentials from the JsonReader.
Parameters:
Returns:
Throws:
identity
public String identity()
Get the identity property: Indicates the managed identity assigned to the custom credential. If a user-assigned identity this value is the Client ID. If a system-assigned identity, the value will be `system`. In the case of a system-assigned identity, the Client ID will be determined by the runner. This identity may be used to authenticate to key vault to retrieve credentials or it may be the only source of authentication used for accessing the registry.
Returns:
password
public SecretObject password()
Get the password property: The password for logging into the custom registry. The password is a secret object that allows multiple ways of providing the value for it.
Returns:
toJson
username
public SecretObject username()
Get the username property: The username for logging into the custom registry.
Returns:
validate
public void validate()
Validates the instance.
withIdentity
public CustomRegistryCredentials withIdentity(String identity)
Set the identity property: Indicates the managed identity assigned to the custom credential. If a user-assigned identity this value is the Client ID. If a system-assigned identity, the value will be `system`. In the case of a system-assigned identity, the Client ID will be determined by the runner. This identity may be used to authenticate to key vault to retrieve credentials or it may be the only source of authentication used for accessing the registry.
Parameters:
Returns:
withPassword
public CustomRegistryCredentials withPassword(SecretObject password)
Set the password property: The password for logging into the custom registry. The password is a secret object that allows multiple ways of providing the value for it.
Parameters:
Returns:
withUsername
public CustomRegistryCredentials withUsername(SecretObject username)
Set the username property: The username for logging into the custom registry.
Parameters:
Returns:
Applies to
Azure SDK for Java