'''
Manage storage account keys.
'''
from .... pyaz_utils import _call_az

def renew(account_name, key, key_type=None, resource_group=None):
    '''
    Regenerate one of the access keys or Kerberos keys (if active directory enabled) for a storage account.

    Required Parameters:
    - account_name -- The storage account name.
    - key -- The key options to regenerate.

    Optional Parameters:
    - key_type -- The key type to regenerate. If --key-type is not specified, one of access keys will be regenerated by default.
    - resource_group -- Name of resource group. You can configure the default group using `az configure --defaults group=<name>`
    '''
    return _call_az("az storage account keys renew", locals())


def list(account_name, expand_key_type=None, resource_group=None):
    '''
    List the access keys or Kerberos keys (if active directory enabled) for a storage account.

    Required Parameters:
    - account_name -- The storage account name.

    Optional Parameters:
    - expand_key_type -- Specify the expanded key types to be listed.
    - resource_group -- Name of resource group. You can configure the default group using `az configure --defaults group=<name>`
    '''
    return _call_az("az storage account keys list", locals())

