Class GenerateCredentialsParameters

java.lang.Object
com.azure.resourcemanager.containerregistry.models.GenerateCredentialsParameters

public final class GenerateCredentialsParameters extends Object
The parameters used to generate credentials for a specified token or user of a container registry.
  • Constructor Details

    • GenerateCredentialsParameters

      public GenerateCredentialsParameters()
      Creates an instance of GenerateCredentialsParameters class.
  • Method Details

    • tokenId

      public String tokenId()
      Get the tokenId property: The resource ID of the token for which credentials have to be generated.
      Returns:
      the tokenId value.
    • withTokenId

      public GenerateCredentialsParameters withTokenId(String tokenId)
      Set the tokenId property: The resource ID of the token for which credentials have to be generated.
      Parameters:
      tokenId - the tokenId value to set.
      Returns:
      the GenerateCredentialsParameters object itself.
    • expiry

      public OffsetDateTime expiry()
      Get the expiry property: The expiry date of the generated credentials after which the credentials become invalid.
      Returns:
      the expiry value.
    • withExpiry

      public GenerateCredentialsParameters withExpiry(OffsetDateTime expiry)
      Set the expiry property: The expiry date of the generated credentials after which the credentials become invalid.
      Parameters:
      expiry - the expiry value to set.
      Returns:
      the GenerateCredentialsParameters object itself.
    • name

      public TokenPasswordName name()
      Get the name property: Specifies name of the password which should be regenerated if any -- password1 or password2.
      Returns:
      the name value.
    • withName

      Set the name property: Specifies name of the password which should be regenerated if any -- password1 or password2.
      Parameters:
      name - the name value to set.
      Returns:
      the GenerateCredentialsParameters object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.