def METHOD_NAME(account_name: Optional[str] = None,
                            resource_group_name: Optional[str] = None,
                            opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableListBatchAccountKeysResult:
    """
    This operation applies only to Batch accounts with allowedAuthenticationModes containing 'SharedKey'. If the Batch account doesn't contain 'SharedKey' in its allowedAuthenticationMode, clients cannot use shared keys to authenticate, and must use another allowedAuthenticationModes instead. In this case, getting the keys will fail.
    Azure REST API version: 2023-05-01.
    :param str account_name: The name of the Batch account.
    :param str resource_group_name: The name of the resource group that contains the Batch account.
    """
    __args__ = dict()
    __args__['accountName'] = account_name
    __args__['resourceGroupName'] = resource_group_name
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('azure-native:batch:listBatchAccountKeys', __args__, opts=opts, typ=ListBatchAccountKeysResult).value
    return AwaitableListBatchAccountKeysResult(
        account_name=pulumi.get(__ret__, 'account_name'),
        primary=pulumi.get(__ret__, 'primary'),
        secondary=pulumi.get(__ret__, 'secondary'))