code: public RegenerateKeyOutputInner regenerateKey(String resourceGroupName, String mediaServiceName, KeyType keyType) {
          return regenerateKeyWithServiceResponseAsync(resourceGroupName, mediaServiceName, keyType).toBlocking().single().body();
      }
docs: Regenerates a primary or secondary key for a Media Service.
  
  @param resourceGroupName Name of the resource group within the Azure subscription.
  @param mediaServiceName Name of the Media Service.
  @param keyType The keyType indicating which key you want to regenerate, Primary or Secondary. Possible values include: 'Primary', 'Secondary'
  @throws IllegalArgumentException thrown if parameters fail the validation
  @throws ApiErrorException thrown if the request is rejected by server
  @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
  @return the RegenerateKeyOutputInner object if successful.